aboutsummaryrefslogtreecommitdiffstats
path: root/keyserver/gpgkeys_hkp.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--keyserver/gpgkeys_hkp.c4
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')