]> git.sesse.net Git - vlc/commit
Fix crash in invalid mkv files
authorCheng Sun <chengsun9@gmail.com>
Wed, 23 Nov 2011 21:39:12 +0000 (21:39 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Wed, 23 Nov 2011 22:49:29 +0000 (23:49 +0100)
commit73160f1a9bd3b3fa666abdd0c65ad7a083ea3b93
tree073cb1a8704623773b30f13da7d90093aa097b95
parent2bb4972e1e4b0a7ab735a6902c2bb616c0f07be4
Fix crash in invalid mkv files

VirtualFromSegments can crash if the std::vector passed in is empty, which
can happen in corrupted files. This is just a simple check for this case,
making it fail elegantly rather than crashing

OK-ed-by: Denis Charmet <typx@dinauz.org>
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/demux/mkv/demux.cpp
modules/demux/mkv/demux.hpp
modules/demux/mkv/mkv.cpp