Minor fixes for GnuPG 1.2.3

Christian Biere cbiere at TechFak.Uni-Bielefeld.DE
Fri Dec 5 15:46:03 CET 2003


Christian Biere wrote:
> diff -u /tmp/gnupg-1.2.3/keyserver/gpgkeys_hkp.c keyserver/gpgkeys_hkp.c
> --- /tmp/gnupg-1.2.3/keyserver/gpgkeys_hkp.c	2003-07-30 17:33:33.000000000 +0200
> +++ keyserver/gpgkeys_hkp.c	2003-12-05 07:59:45.000000000 +0100
> @@ -356,14 +356,10 @@
>    /* Chop off any trailing whitespace.  Note that the HKP servers have
>       \r\n as line endings, and the NAI HKP servers have just \n. */
>  
> -  if(parsedindex>0)
> +  while(parsedindex > 0 && isspace(((unsigned char *)parsed)[parsedindex]))
>      {
> -      parsedindex--;
> -      while(isspace(((unsigned char *)parsed)[parsedindex]))
> -	{
> -	  parsed[parsedindex]='\0';
> -	  parsedindex--;
> -	}
> +	parsed[parsedindex]='\0';
> +	parsedindex--;
>      }
>  }
>  

Oops, the above isn't correct.


--- gpgkeys_hkp.c	2003/07/30 15:33:33	1.1
+++ gpgkeys_hkp.c	2003/12/05 14:38:38
@@ -356,15 +356,9 @@
   /* Chop off any trailing whitespace.  Note that the HKP servers have
      \r\n as line endings, and the NAI HKP servers have just \n. */
 
-  if(parsedindex>0)
-    {
-      parsedindex--;
-      while(isspace(((unsigned char *)parsed)[parsedindex]))
-	{
-	  parsed[parsedindex]='\0';
-	  parsedindex--;
-	}
-    }
+   while(parsedindex-- > 0) 
+       if (isspace(((unsigned char *)parsed)[parsedindex]))
+         parsed[parsedindex]='\0';
 }
 
 static int
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 303 bytes
Desc: not available
Url : /pipermail/attachments/20031205/c3e9aed1/attachment.bin


More information about the Gnupg-devel mailing list