projects
/
sent.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cd307e3
)
check memory allocation for calloc, die on failure
author
Hiltjo Posthuma
<hiltjo@codemadness.org>
Fri, 12 Aug 2016 11:09:36 +0000
(13:09 +0200)
committer
Markus Teich
<markus.teich@stusta.mhn.de>
Mon, 10 Oct 2016 18:51:15 +0000
(20:51 +0200)
sent.c
patch
|
blob
|
history
diff --git
a/sent.c
b/sent.c
index 82acd81c5e5809a8f79dd2dfbf248910c32cfc3d..5fce290990f693c9f6219ee6b913b3892c652adf 100644
(file)
--- a/
sent.c
+++ b/
sent.c
@@
-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 =
e
calloc(1, sizeof(Image));
s->img->bufwidth = ntohl(*(uint32_t *)&hdr[8]);
s->img->bufheight = ntohl(*(uint32_t *)&hdr[12]);