We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 57971db commit 1b0f0d0Copy full SHA for 1b0f0d0
imap/message.c
@@ -330,7 +330,7 @@ static int msg_parse_fetch(struct ImapHeader *h, char *s)
330
}
331
s++;
332
ptmp = tmp;
333
- while (*s && *s != '\"')
+ while (*s && (*s != '\"') && (ptmp != (tmp + sizeof(tmp) - 1)))
334
*ptmp++ = *s++;
335
if (*s != '\"')
336
return -1;
@@ -343,7 +343,7 @@ static int msg_parse_fetch(struct ImapHeader *h, char *s)
343
s += 11;
344
SKIPWS(s);
345
346
- while (isdigit((unsigned char) *s))
+ while (isdigit((unsigned char) *s) && (ptmp != (tmp + sizeof(tmp) - 1)))
347
348
*ptmp = '\0';
349
if (mutt_str_atol(tmp, &h->content_length) < 0)
0 commit comments