sierravmd: Do sanity checking of frame sizes
authorMartin Storsjö <martin@martin.st>
Wed, 11 Sep 2013 19:56:55 +0000 (22:56 +0300)
committerMartin Storsjö <martin@martin.st>
Mon, 16 Sep 2013 08:04:52 +0000 (11:04 +0300)
commit0ef1660a6365ce60ead8858936b6f3f8ea862826
tree115a0a63e3c3e982dec2cba1c1d9d23aea6c9361
parent342c43d154e586bc022c86b168fe8d36f69da9d3
sierravmd: Do sanity checking of frame sizes

Limit the size to INT_MAX/2 (for simplicity) to be sure that
size + BYTES_PER_FRAME_RECORD won't overflow.

Also factorize other existing error return paths.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/sierravmd.c