* hkp.c (parse_hkp_index): Properly handle really large keys (5 digit key
authorDavid Shaw <dshaw@jabberwocky.com>
Wed, 14 Aug 2002 22:48:28 +0000 (22:48 +0000)
committerDavid Shaw <dshaw@jabberwocky.com>
Wed, 14 Aug 2002 22:48:28 +0000 (22:48 +0000)
length) in HKP searches.

g10/ChangeLog
g10/hkp.c

index 708bd12..d083685 100644 (file)
@@ -1,3 +1,8 @@
+2002-08-14  David Shaw  <dshaw@jabberwocky.com>
+
+       * hkp.c (parse_hkp_index): Properly handle really large keys
+       (5 digit key length) in HKP searches.
+
 2002-08-13  David Shaw  <dshaw@jabberwocky.com>
 
        * encode.c (encode_simple): Fix problem with using compression
index 234a578..a680d56 100644 (file)
--- a/g10/hkp.c
+++ b/g10/hkp.c
@@ -279,8 +279,8 @@ parse_hkp_index(IOBUF buffer,char *line)
      certain unchanging landmarks, we can't reliably parse the
      response. */
   if(open && ascii_memcasecmp(line,"</pre>",6)!=0 &&
-     ascii_memcasecmp(line,"pub  ",5)!=0 &&
-     ascii_memcasecmp(line,"     ",5)!=0)
+     ascii_memcasecmp(line,"pub ",4)!=0 &&
+     ascii_memcasecmp(line,"    ",4)!=0)
     {
       m_free(key);
       m_free(uid);
@@ -313,7 +313,7 @@ parse_hkp_index(IOBUF buffer,char *line)
          ret=1;
        }
 
-      if(strncmp(line,"     ",5)!=0)
+      if(strncmp(line,"    ",4)!=0)
        {
          revoked=0;
          m_free(key);
@@ -323,7 +323,7 @@ parse_hkp_index(IOBUF buffer,char *line)
        }
     }
 
-  if(ascii_memcasecmp(line,"pub  ",5)==0)
+  if(ascii_memcasecmp(line,"pub ",4)==0)
     {
       char *tok,*temp;