* gpgkeys_hkp.c (dehtmlize, parse_hkp_index): Fix memory corruption bug on

some platforms.
This commit is contained in:
David Shaw 2003-04-09 01:36:16 +00:00
parent 55fc1bb453
commit 11fc63ba93
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2003-04-08 David Shaw <dshaw@jabberwocky.com>
* gpgkeys_hkp.c (dehtmlize, parse_hkp_index): Fix memory
corruption bug on some platforms.
2003-03-11 David Shaw <dshaw@jabberwocky.com>
* gpgkeys_hkp.c (get_key): Properly handle CRLF line endings in

View File

@ -368,6 +368,8 @@ dehtmlize(char *line)
while(isspace(((unsigned char *)parsed)[parsedindex]))
{
parsed[parsedindex]='\0';
if(parsedindex==0)
break;
parsedindex--;
}
}
@ -441,7 +443,7 @@ parse_hkp_index(IOBUF buffer,char *line)
line++;
tok=strsep(&line,"/");
if(tok==NULL)
if(tok==NULL || strlen(tok)==0)
return ret;
if(tok[strlen(tok)-1]=='R')