[MPlayer-cvslog] r32309 - trunk/libmpdemux/demux_mkv.c
reimar
subversion at mplayerhq.hu
Sat Sep 18 19:40:14 CEST 2010
Author: reimar
Date: Sat Sep 18 19:40:14 2010
New Revision: 32309
Log:
Check for realloc failure. Ignore the memleak this causes since
the mkv demuxer is not properly maintained anymore anyway.
Modified:
trunk/libmpdemux/demux_mkv.c
Modified: trunk/libmpdemux/demux_mkv.c
==============================================================================
--- trunk/libmpdemux/demux_mkv.c Sat Sep 18 19:38:23 2010 (r32308)
+++ trunk/libmpdemux/demux_mkv.c Sat Sep 18 19:40:14 2010 (r32309)
@@ -323,6 +323,8 @@ static int demux_mkv_decode(mkv_track_t
*size += 4000;
*dest = realloc(*dest, *size + AV_LZO_INPUT_PADDING);
+ if (!*dest)
+ goto zlib_fail;
zstream.next_out = (Bytef *) (*dest + zstream.total_out);
result = inflate(&zstream, Z_NO_FLUSH);
if (result != Z_OK && result != Z_STREAM_END) {
@@ -356,6 +358,8 @@ zlib_fail:
if (dstlen > SIZE_MAX - padding)
goto lzo_fail;
*dest = realloc(*dest, dstlen + padding);
+ if (!*dest)
+ goto lzo_fail;
out_avail = dstlen;
result = av_lzo1x_decode(*dest, &out_avail, src, &srclen);
if (result == 0)
More information about the MPlayer-cvslog
mailing list