ffmdec: validate codec parameters
authorAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Wed, 16 Nov 2016 23:04:57 +0000 (00:04 +0100)
committerAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Fri, 25 Nov 2016 21:21:14 +0000 (22:21 +0100)
commitde031809f3a001f1c31eace1ff6e42355c87b9bc
treed6b147a62d80f11058e15b4358e870d9a79f5e77
parent6550d0580b075912a39129fe1774b385ee50a9cf
ffmdec: validate codec parameters

A negative extradata size for example gets passed to memcpy in
avcodec_parameters_from_context causing a segmentation fault.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 1c7da19a4b45f5623cb3955b29b9a581026e3c61)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
libavformat/ffmdec.c