Skip to content
Permalink
Browse files Browse the repository at this point in the history
Add alloc fail check in nntp_fetch_headers
  • Loading branch information
jeriko-one authored and flatcap committed Jul 4, 2018
1 parent 6296f71 commit 9e927af
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nntp.c
Expand Up @@ -1288,6 +1288,8 @@ static int nntp_fetch_headers(struct Context *ctx, void *hc, anum_t first,
fc.last = last;
fc.restore = restore;
fc.messages = mutt_mem_calloc(last - first + 1, sizeof(unsigned char));
if (fc.messages == NULL)
return -1;
#ifdef USE_HCACHE
fc.hc = hc;
#endif
Expand Down

0 comments on commit 9e927af

Please sign in to comment.