Skip to content

Commit 9e927af

Browse files
jeriko-oneflatcap
authored andcommitted
Add alloc fail check in nntp_fetch_headers
1 parent 6296f71 commit 9e927af

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: nntp.c

+2
Original file line numberDiff line numberDiff line change
@@ -1288,6 +1288,8 @@ static int nntp_fetch_headers(struct Context *ctx, void *hc, anum_t first,
12881288
fc.last = last;
12891289
fc.restore = restore;
12901290
fc.messages = mutt_mem_calloc(last - first + 1, sizeof(unsigned char));
1291+
if (fc.messages == NULL)
1292+
return -1;
12911293
#ifdef USE_HCACHE
12921294
fc.hc = hc;
12931295
#endif

0 commit comments

Comments
 (0)