diff options
author | David Shaw <[email protected]> | 2003-04-09 01:36:16 +0000 |
---|---|---|
committer | David Shaw <[email protected]> | 2003-04-09 01:36:16 +0000 |
commit | 11fc63ba93a4b3f610dbb31c6b29288a7f6ef99b (patch) | |
tree | 5499642ffa6aa859476c9c3bc6833590d0666d36 /keyserver/gpgkeys_hkp.c | |
parent | * autogen.sh: Add options to build for coldfire and uClinux. (diff) | |
download | gnupg-11fc63ba93a4b3f610dbb31c6b29288a7f6ef99b.tar.gz gnupg-11fc63ba93a4b3f610dbb31c6b29288a7f6ef99b.zip |
* gpgkeys_hkp.c (dehtmlize, parse_hkp_index): Fix memory corruption bug on
some platforms.
Diffstat (limited to '')
-rw-r--r-- | keyserver/gpgkeys_hkp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/keyserver/gpgkeys_hkp.c b/keyserver/gpgkeys_hkp.c index 7cda6901c..96c81985a 100644 --- a/keyserver/gpgkeys_hkp.c +++ b/keyserver/gpgkeys_hkp.c @@ -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') |