Mercurial > mplayer.hg
diff libmpdemux/demux_mkv.c @ 35341:34c05e3ea263
Fix leaks in case of overflow.
author | upsuper |
---|---|
date | Wed, 21 Nov 2012 11:15:38 +0000 |
parents | 9120eb514454 |
children | 139f2b064ef9 |
line wrap: on
line diff
--- a/libmpdemux/demux_mkv.c Tue Nov 20 22:25:04 2012 +0000 +++ b/libmpdemux/demux_mkv.c Wed Nov 21 11:15:38 2012 +0000 @@ -1546,6 +1546,7 @@ 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);