]> git.sesse.net Git - ffmpeg/commit
mss12: validate display dimensions
authorAnton Khirnov <anton@khirnov.net>
Sun, 14 Aug 2016 08:18:39 +0000 (10:18 +0200)
committerAnton Khirnov <anton@khirnov.net>
Thu, 18 Aug 2016 15:06:46 +0000 (17:06 +0200)
commit6755eb5b212384e0599f7f2c5de42df49fff57de
tree5f62e4d0c6c93bb5e270dbf98be7e3689e91c3f6
parent33f10546ec012ad4e1054b57317885cded7e953e
mss12: validate display dimensions

The code currently reads the coded dimensions from the extradata, but
expects the display dimensions to be set by the caller, and does not
check that they are compatible (i.e. that the displayed size is smaller
than the coded size).

Make sure that when the display dimensions are set, they are also valid.
Fixes possible invalid memory access.

CC: libav-stable@libav.org
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
libavcodec/mss12.c