Module Name:    src
Committed By:   agc
Date:           Sat Jan  1 19:53:53 UTC 2011

Modified Files:
        src/crypto/external/bsd/netpgp/dist/src/lib: ssh2pgp.c

Log Message:
Fix a problem with overrunning a base64 decoded number when decoding ssh
keys, from Anthony Bentley.

        % netpgpkeys --ssh -l --hash=md5
        1 key found
        signature  1024/RSA (Encrypt or Sign) 666f47feddcdb77d 2002-07-02
        Key fingerprint: e1d6 b328 8126 e8e3 666f 47fe ddcd b77d
        uid              machinename.com (/home/user/.ssh/id_rsa.pub) 
<u...@machinename.com>

        % ssh-keygen -l -f ~/.ssh/id_rsa.pub
        1024 e1:d6:b3:28:81:26:e8:e3:66:6f:47:fe:dd:cd:b7:7d 
/home/user/.ssh/id_rsa.pub (RSA)
        %

ssh keys and netpgp work as above.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 \
    src/crypto/external/bsd/netpgp/dist/src/lib/ssh2pgp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/netpgp/dist/src/lib/ssh2pgp.c
diff -u src/crypto/external/bsd/netpgp/dist/src/lib/ssh2pgp.c:1.21 src/crypto/external/bsd/netpgp/dist/src/lib/ssh2pgp.c:1.22
--- src/crypto/external/bsd/netpgp/dist/src/lib/ssh2pgp.c:1.21	Mon Nov 29 06:21:40 2010
+++ src/crypto/external/bsd/netpgp/dist/src/lib/ssh2pgp.c	Sat Jan  1 19:53:53 2011
@@ -251,7 +251,7 @@
 	}
 
 	/* convert from base64 to binary */
-	cc = bufgap_getbin(&bg, buf, (size_t)st.st_size);
+	cc = bufgap_getbin(&bg, buf, (size_t)bg.bcc);
 	if ((space = strchr(buf, ' ')) != NULL) {
 		cc = (int)(space - buf);
 	}

Reply via email to