nsvdec: Be more careful with av_malloc().
authorAlex Converse <alex.converse@gmail.com>
Fri, 27 Jan 2012 01:21:46 +0000 (17:21 -0800)
committerReinhard Tartler <siretart@tauware.de>
Sat, 21 Apr 2012 13:38:10 +0000 (15:38 +0200)
commit056c909d9df7704c8e5bbaab9fdab5e7bc969e0b
treee972799a898ff087b39ea340f80425b0071791eb
parentbde4b660637c9f08eef51697c54417037a9eeb2f
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)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
(cherry picked from commit be524c186b50337db64d34a5726dfe3e8ea94f09)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
(cherry picked from commit 87007519c81c37d8a3de424de3db14078ae84333)

Conflicts:

libavformat/nsvdec.c
libavformat/nsvdec.c