]> granicus.if.org Git - neomutt/commitdiff
Ensure UID in fetch_uidl
authorJerikoOne <jeriko.one@gmx.us>
Sat, 7 Jul 2018 20:55:34 +0000 (15:55 -0500)
committerRichard Russon <rich@flatcap.org>
Sat, 7 Jul 2018 20:55:34 +0000 (15:55 -0500)
pop.c

diff --git a/pop.c b/pop.c
index 4f3a592a8d562aec7dfe3c80bec8e010cd879c97..c52585abe7d08ffcf04e5726599e0c67207b2d7d 100644 (file)
--- a/pop.c
+++ b/pop.c
@@ -202,6 +202,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_str_strcmp(line, ctx->hdrs[i]->data) == 0)
       break;