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

upsuper subversion at mplayerhq.hu
Wed Nov 21 12:15:38 CET 2012


Author: upsuper
Date: Wed Nov 21 12:15:38 2012
New Revision: 35435

Log:
Fix leaks in case of overflow.

Modified:
   trunk/libmpdemux/demux_mkv.c

Modified: trunk/libmpdemux/demux_mkv.c
==============================================================================
--- trunk/libmpdemux/demux_mkv.c	Tue Nov 20 23:25:04 2012	(r35434)
+++ trunk/libmpdemux/demux_mkv.c	Wed Nov 21 12:15:38 2012	(r35435)
@@ -1546,6 +1546,7 @@ static int demux_mkv_open_video(demuxer_
             cnt = track->private_size - RVPROPERTIES_SIZE;
             if (cnt > INT_MAX - sizeof(*bih) - 8) {
                 mp_msg(MSGT_DEMUX, MSGL_ERR, "[mkv] Integer overflow!\n");
+                free(bih);
                 return 1;
             }
             bih = realloc(bih, sizeof(*bih) + 8 + cnt);


More information about the MPlayer-cvslog mailing list