* gpgkeys_ldap.c (printquoted), curl-shim.c (curl_escape): Fix bad

encoding of characters > 127.  Noted by Nalin Dahyabhai.
This commit is contained in:
David Shaw 2006-07-12 21:16:57 +00:00
parent 0b5bc307d7
commit 5476afe1b4
3 changed files with 7 additions and 2 deletions

View 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.

View 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;
}

View 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);