From e154cba1b3fc52bb8cb8aa846353c0db79b5d9c6 Mon Sep 17 00:00:00 2001 From: JerikoOne Date: Fri, 13 Jul 2018 10:47:11 -0700 Subject: [PATCH] Ensure UID in fetch_uidl. --- pop.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pop.c b/pop.c index ecfd8d7c..d9d95fbe 100644 --- 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; -- 2.40.0