--- sent.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sent.c b/sent.c index 82acd81..1518015 100644 --- a/sent.c +++ b/sent.c _AT_@ -210,7 +210,9 @@ 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)); + if (!(s->img = calloc(1, sizeof(Image)))) + die("sent: Unable to allocate image:"); + s->img->bufwidth = ntohl(*(uint32_t *)&hdr[8]); s->img->bufheight = ntohl(*(uint32_t *)&hdr[12]); -- 2.10.2
This archive was generated by hypermail 2.3.0 : Tue Nov 01 2016 - 23:48:15 CET