diff --git a/keyserver/ChangeLog b/keyserver/ChangeLog index c171f6a3a..0a4da42f3 100644 --- a/keyserver/ChangeLog +++ b/keyserver/ChangeLog @@ -1,3 +1,8 @@ +2006-07-12 David Shaw + + * gpgkeys_ldap.c (printquoted), curl-shim.c (curl_escape): Fix bad + encoding of characters > 127. Noted by Nalin Dahyabhai. + 2006-04-26 David Shaw * gpgkeys_http.c, gpgkeys_oldhkp.c: Removed. diff --git a/keyserver/curl-shim.c b/keyserver/curl-shim.c index 4a4d18f56..8c7c36539 100644 --- a/keyserver/curl-shim.c +++ b/keyserver/curl-shim.c @@ -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; } diff --git a/keyserver/gpgkeys_ldap.c b/keyserver/gpgkeys_ldap.c index b4bd00e4f..2e4d39d4a 100644 --- a/keyserver/gpgkeys_ldap.c +++ b/keyserver/gpgkeys_ldap.c @@ -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);