aboutsummaryrefslogtreecommitdiffstats
path: root/g10/hkp.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/hkp.c')
-rw-r--r--g10/hkp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/g10/hkp.c b/g10/hkp.c
index 142b3a0f2..745154c77 100644
--- a/g10/hkp.c
+++ b/g10/hkp.c
@@ -320,6 +320,8 @@ dehtmlize(char *line)
while(isspace(((unsigned char*)parsed)[parsedindex]))
{
parsed[parsedindex]='\0';
+ if(parsedindex==0)
+ break;
parsedindex--;
}
}
@@ -411,7 +413,7 @@ parse_hkp_index(IOBUF buffer,char *line)
line+=4;
tok=strsep(&line,"/");
- if(tok==NULL)
+ if(tok==NULL || strlen(tok)==0)
return ret;
if(tok[strlen(tok)-1]=='R')