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 | |
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/ChangeLog | 5 | ||||
-rw-r--r-- | keyserver/gpgkeys_hkp.c | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/keyserver/ChangeLog b/keyserver/ChangeLog index 86011baad..2ca7559ad 100644 --- a/keyserver/ChangeLog +++ b/keyserver/ChangeLog @@ -1,3 +1,8 @@ +2003-04-08 David Shaw <[email protected]> + + * gpgkeys_hkp.c (dehtmlize, parse_hkp_index): Fix memory + corruption bug on some platforms. + 2003-03-11 David Shaw <[email protected]> * gpgkeys_hkp.c (get_key): Properly handle CRLF line endings in 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') |