aboutsummaryrefslogtreecommitdiffstats
path: root/w3mimgdisplay.c
diff options
context:
space:
mode:
authorTatsuya Kinoshita <tats@debian.org>2021-01-02 00:20:37 +0000
committerTatsuya Kinoshita <tats@debian.org>2021-01-02 00:20:37 +0000
commit1d0ba25a660483da1272a31dd077ed94441e3d9f (patch)
tree1d8dee52cd1e3d340fe178a8193dc96c4496db84 /w3mimgdisplay.c
parentMerge branch 'cvstrunk' into upstream (diff)
downloadw3m-upstream/0.5.3+git20210102.tar.gz
w3m-upstream/0.5.3+git20210102.zip
New upstream version 0.5.3+git20210102upstream/0.5.3+git20210102upstream
Diffstat (limited to 'w3mimgdisplay.c')
-rw-r--r--w3mimgdisplay.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/w3mimgdisplay.c b/w3mimgdisplay.c
index 5486a47..ccfa373 100644
--- a/w3mimgdisplay.c
+++ b/w3mimgdisplay.c
@@ -281,6 +281,10 @@ DrawImage(char *buf, int redraw)
maxImage = n + 1;
imageBuf = (W3MImage *) realloc((void *)imageBuf,
sizeof(W3MImage) * maxImage);
+ if (imageBuf == NULL) {
+ fprintf(stderr, "Out of memory\n");
+ exit(1);
+ }
for (; i < maxImage; i++)
imageBuf[i].pixmap = NULL;
}