summaryrefslogtreecommitdiff
path: root/src/demuxers/demux_mng.c
diff options
context:
space:
mode:
authorDarren Salt <linux@youmustbejoking.demon.co.uk>2008-08-13 17:33:04 +0100
committerDarren Salt <linux@youmustbejoking.demon.co.uk>2008-08-13 17:33:04 +0100
commitb9dc65ff35387961d9526f5c443f9af43a3c1909 (patch)
tree88011028b413e4fb50d50eb2402427401b58ea56 /src/demuxers/demux_mng.c
parent4aef516243988c11ad23ed11c373228598f3e48b (diff)
downloadxine-lib-b9dc65ff35387961d9526f5c443f9af43a3c1909.tar.gz
xine-lib-b9dc65ff35387961d9526f5c443f9af43a3c1909.tar.bz2
Check for allocation failures.
Diffstat (limited to 'src/demuxers/demux_mng.c')
-rw-r--r--src/demuxers/demux_mng.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/demuxers/demux_mng.c b/src/demuxers/demux_mng.c
index a32374048..0fcdb24ff 100644
--- a/src/demuxers/demux_mng.c
+++ b/src/demuxers/demux_mng.c
@@ -116,7 +116,9 @@ static mng_bool mymng_process_header(mng_handle mngh, mng_uint32 width, mng_uint
this->bih.biHeight = height;
this->left_edge = (this->bih.biWidth - width) / 2;
- this->image = malloc(this->bih.biWidth * height * 3);
+ this->image = malloc((mng_size_t)this->bih.biWidth * (mng_size_t)height * 3);
+ if (!this->image)
+ return MNG_FALSE;
mng_set_canvasstyle(mngh, MNG_CANVAS_RGB8);