---
 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
@@ -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

Attachment: signature.asc
Description: PGP signature

Reply via email to