diff options
author | Hiltjo Posthuma <hiltjo@codemadness.org> | 2016-08-12 13:09:36 +0200 |
---|---|---|
committer | Markus Teich <markus.teich@stusta.mhn.de> | 2016-10-10 20:51:15 +0200 |
commit | 8185d5eacbcd3fc2420e752e8175c05b9a35b9b3 (patch) | |
tree | ef5654a7c4ebab15c7034d7a61dc9eaa68056a35 /sent.c | |
parent | cd307e3ba0601c6589a96f6f9f986828a0f4779d (diff) |
check memory allocation for calloc, die on failure
Diffstat (limited to 'sent.c')
-rw-r--r-- | sent.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -210,7 +210,7 @@ ffload(Slide *s) if (memcmp("farbfeld", hdr, 8)) die("sent: Filtered file '%s' has no valid farbfeld header", filename); - s->img = calloc(1, sizeof(Image)); + s->img = ecalloc(1, sizeof(Image)); s->img->bufwidth = ntohl(*(uint32_t *)&hdr[8]); s->img->bufheight = ntohl(*(uint32_t *)&hdr[12]); |