nsvdec: Be more careful with av_malloc().
authorAlex Converse <alex.converse@gmail.com>
Fri, 27 Jan 2012 01:21:46 +0000 (17:21 -0800)
committerAlex Converse <alex.converse@gmail.com>
Tue, 6 Mar 2012 23:28:00 +0000 (15:28 -0800)
commite410dd17920342b7f08f16675044f077c88c251b
tree9fae69f07fa936aee9375d2c8ea0dd30841975bf
parentffdc41f0395f74cb8844361d2154784ce65e8fdd
nsvdec: Be more careful with av_malloc().

Check results for av_malloc() and fix an overflow in one call.

Related to CVE-2011-3940.

Based in part on work from Michael Niedermayer.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
(cherry picked from commit 8fd8a48263ff1437f9d02d7e78dc63efb9b5ed3a)
libavformat/nsvdec.c