guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

03/03: nar: Read archive signatures as Latin-1 strings.


From: Ludovic Courtès
Subject: 03/03: nar: Read archive signatures as Latin-1 strings.
Date: Sun, 18 Jan 2015 21:22:33 +0000

civodul pushed a commit to branch master
in repository guix.

commit 71c1d5280cdeba90cfd1230f5f376a7e89b93694
Author: Ludovic Courtès <address@hidden>
Date:   Sun Jan 18 22:19:04 2015 +0100

    nar: Read archive signatures as Latin-1 strings.
    
    Fixes <http://bugs.gnu.org/19610>.
    Reported by Mark H Weaver <address@hidden>.
    
    * guix/nar.scm (restore-one-item): Use 'read-latin1-string' to read the
      signature.
---
 guix/nar.scm |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/guix/nar.scm b/guix/nar.scm
index bab727e..43e5210 100644
--- a/guix/nar.scm
+++ b/guix/nar.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <address@hidden>
+;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <address@hidden>
 ;;; Copyright © 2014 Mark H Weaver <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -211,7 +211,9 @@ s-expression"))
                 (_ "importing file or directory '~a'...~%")
                 file)
 
-        (let ((sig (and has-sig? (read-string port))))
+        ;; The signature may contain characters that are meant to be
+        ;; interpreted as bytes in a 'char *', so read them as a ISO-8859-1.
+        (let ((sig (and has-sig? (read-latin1-string port))))
           (when verify-signature?
             (if sig
                 (begin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]