Skip to content

Commit 93b8ac5

Browse files
jeriko-oneflatcap
authored andcommitted
Ensure UID in fetch_uidl
1 parent e27b65b commit 93b8ac5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: pop.c

+4
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,10 @@ static int fetch_uidl(char *line, void *data)
202202
endp++;
203203
memmove(line, endp, strlen(endp) + 1);
204204

205+
/* uid must be at least be 1 byte */
206+
if (strlen(line) == 0)
207+
return -1;
208+
205209
for (i = 0; i < ctx->msgcount; i++)
206210
if (mutt_str_strcmp(line, ctx->hdrs[i]->data) == 0)
207211
break;

0 commit comments

Comments
 (0)