On Tue, Dec 15, 2015 at 01:19:01AM +0100, Andreas Cadhalpun wrote: > On 15.12.2015 00:43, Michael Niedermayer wrote: > > On Tue, Dec 15, 2015 at 12:03:22AM +0100, Andreas Cadhalpun wrote: > >> A negative codec_id cannot be handled by the found_decoder API of > >> AVStream->info: if the codec_id is not recognized, found_decoder is set > >> to -codec_id, which has to be '<0' according to the API documentation. > >> > >> This can cause NULL pointer dereferencing in try_decode_frame. > >> > >> Signed-off-by: Andreas Cadhalpun <andreas.cadhal...@googlemail.com> > >> --- > >> libavformat/ffmdec.c | 12 ++++++++++++ > >> 1 file changed, 12 insertions(+) > > > > can avcodec_descriptor_get() be used instead of < 0 to check the codec > > ids validity ? > > Yes. > > > codec_type could be checked too that way > > Why not. Updated patch attached. > > Best regards, > Andreas >
> ffmdec.c | 28 ++++++++++++++++++++++++++++ > 1 file changed, 28 insertions(+) > 5a300bbcfb78b1f24b8b7c572d420577b2a1b1f3 > 0001-ffm-reject-invalid-codec_id-and-codec_type.patch > From 3e16e9c3c32c9740c8851fd22bb60175852ffc25 Mon Sep 17 00:00:00 2001 > From: Andreas Cadhalpun <andreas.cadhal...@googlemail.com> > Date: Mon, 14 Dec 2015 22:11:55 +0100 > Subject: [PATCH] ffm: reject invalid codec_id and codec_type LGTM thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB During times of universal deceit, telling the truth becomes a revolutionary act. -- George Orwell
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel