mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
* gpgkeys_hkp.c (dehtmlize, parse_hkp_index): Fix memory corruption bug on
some platforms.
This commit is contained in:
parent
55fc1bb453
commit
11fc63ba93
2 changed files with 8 additions and 1 deletions
|
@ -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')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue