[MPlayer-cvslog] r37682 - trunk/libmpdemux/demux_mkv.c

reimar subversion at mplayerhq.hu
Thu Feb 11 22:56:15 CET 2016


Author: reimar
Date: Thu Feb 11 22:56:14 2016
New Revision: 37682

Log:
demux_mkv: Fix memleak.

Should use goto instead of return.

Modified:
   trunk/libmpdemux/demux_mkv.c

Modified: trunk/libmpdemux/demux_mkv.c
==============================================================================
--- trunk/libmpdemux/demux_mkv.c	Thu Feb 11 22:54:19 2016	(r37681)
+++ trunk/libmpdemux/demux_mkv.c	Thu Feb 11 22:56:14 2016	(r37682)
@@ -851,7 +851,7 @@ static int demux_mkv_read_trackentry(dem
             uint64_t num = ebml_read_length(s, &x);
             // audit: cheap guard against overflows later..
             if (num > SIZE_MAX - 1000)
-                return 0;
+                goto err_out;
             l = x + num;
             track->private_data = malloc(num + AV_LZO_INPUT_PADDING);
             if (stream_read(s, track->private_data, num) != (int) num)


More information about the MPlayer-cvslog mailing list