]> granicus.if.org Git - mutt/commitdiff
Ensure UID in fetch_uidl.
authorJerikoOne <jeriko.one@gmx.us>
Fri, 13 Jul 2018 17:47:11 +0000 (10:47 -0700)
committerKevin McCarthy <kevin@8t8.us>
Fri, 13 Jul 2018 17:47:11 +0000 (10:47 -0700)
pop.c

diff --git a/pop.c b/pop.c
index ecfd8d7ce2dd7c0437de299755158a485e919db3..d9d95fbe5315f516464bd536e374a1bdabfc3df3 100644 (file)
--- a/pop.c
+++ b/pop.c
@@ -152,6 +152,10 @@ static int fetch_uidl (char *line, void *data)
       endp++;
   memmove(line, endp, strlen(endp) + 1);
 
+  /* uid must be at least be 1 byte */
+  if (strlen(line) == 0)
+    return -1;
+
   for (i = 0; i < ctx->msgcount; i++)
     if (!mutt_strcmp (line, ctx->hdrs[i]->data))
       break;