* gpgkeys_ldap.c (printquoted), curl-shim.c (curl_escape): Fix bad
authorDavid Shaw <dshaw@jabberwocky.com>
Wed, 12 Jul 2006 21:16:57 +0000 (21:16 +0000)
committerDavid Shaw <dshaw@jabberwocky.com>
Wed, 12 Jul 2006 21:16:57 +0000 (21:16 +0000)
encoding of characters > 127.  Noted by Nalin Dahyabhai.

keyserver/ChangeLog
keyserver/curl-shim.c
keyserver/gpgkeys_ldap.c

index c171f6a..0a4da42 100644 (file)
@@ -1,3 +1,8 @@
+2006-07-12  David Shaw  <dshaw@jabberwocky.com>
+
+       * gpgkeys_ldap.c (printquoted), curl-shim.c (curl_escape): Fix bad
+       encoding of characters > 127.  Noted by Nalin Dahyabhai.
+
 2006-04-26  David Shaw  <dshaw@jabberwocky.com>
 
        * gpgkeys_http.c, gpgkeys_oldhkp.c: Removed.
index 4a4d18f..8c7c365 100644 (file)
@@ -306,7 +306,7 @@ curl_escape(char *str,int length)
       else
        {
          char numbuf[5];
-         sprintf(numbuf,"%%%02X",str[idx]);
+         sprintf(numbuf,"%%%02X",(unsigned char)str[idx]);
          strcpy(&enc[enc_idx],numbuf);
          enc_idx+=3;
        }
index b4bd00e..2e4d39d 100644 (file)
@@ -1258,7 +1258,7 @@ printquoted(FILE *stream,char *string,char delim)
   while(*string)
     {
       if(*string==delim || *string=='%')
-       fprintf(stream,"%%%02x",*string);
+       fprintf(stream,"%%%02x",(unsigned char)*string);
       else
        fputc(*string,stream);