fetching DE415B0E from sks ([don't know]: invalid packet (ctb=2d))

David Shaw dshaw at jabberwocky.com
Sun Apr 9 15:28:09 CEST 2006


On Fri, Apr 07, 2006 at 08:22:04PM -0400, David Shaw wrote:

> All that said, though, I'm not convinced that the armored stream you
> got from the keyserver is invalid.  I think there may be a problem in
> GPG's armor parser (hard to imagine after this many years, but..)  It
> seems that the bad key is the right length (exactly 8192 bytes) to
> trigger a problem.

This was indeed a bug.  I've attached the fix.  With this patch in
place, you should be able to import DE415B0E without error.

David
-------------- next part --------------
Index: armor.c
===================================================================
--- armor.c	(revision 4096)
+++ armor.c	(revision 4098)
@@ -676,7 +676,7 @@
     int checkcrc=0;
     int rc = 0;
     size_t n = 0;
-    int  idx, i;
+    int  idx, i, onlypad=0;
     u32 crc;
 
     crc = afx->crc;
@@ -720,6 +720,8 @@
 		    goto again;
 		}
 	    }
+	    else if(n==0)
+	      onlypad=1;
 
 	    if( idx == 1 )
 		buf[n++] = val;
@@ -848,7 +850,7 @@
 	}
     }
 
-    if( !n )
+    if( !n && !onlypad )
 	rc = -1;
 
     *retn = n;


More information about the Gnupg-users mailing list