Introduction
Introduction Statistics Contact Development Disclaimer Help
check memory allocation for calloc, die on failure - sent - simple plaintext pr…
git clone git://git.suckless.org/sent
Log
Files
Refs
README
LICENSE
---
commit 8185d5eacbcd3fc2420e752e8175c05b9a35b9b3
parent cd307e3ba0601c6589a96f6f9f986828a0f4779d
Author: Hiltjo Posthuma <[email protected]>
Date: Fri, 12 Aug 2016 13:09:36 +0200
check memory allocation for calloc, die on failure
Diffstat:
M sent.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git 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", f…
- 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]);
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.