mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-09-20 13:26:39 +00:00
avformat/avidec: Check for dv streams before using priv_data in parse ##dc/##wb
Fixes: null pointer dereference
Fixes: 31588/clusterfuzz-testcase-minimized-ffmpeg_dem_AVI_fuzzer-6165716135968768
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit f733688d30
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
4197e4144b
commit
d75ae8f6a7
@ -1257,7 +1257,7 @@ start_sync:
|
|||||||
AVStream *st1 = s->streams[1];
|
AVStream *st1 = s->streams[1];
|
||||||
AVIStream *ast1 = st1->priv_data;
|
AVIStream *ast1 = st1->priv_data;
|
||||||
// workaround for broken small-file-bug402.avi
|
// workaround for broken small-file-bug402.avi
|
||||||
if ( d[2] == 'w' && d[3] == 'b'
|
if (ast1 && d[2] == 'w' && d[3] == 'b'
|
||||||
&& n == 0
|
&& n == 0
|
||||||
&& st ->codecpar->codec_type == AVMEDIA_TYPE_VIDEO
|
&& st ->codecpar->codec_type == AVMEDIA_TYPE_VIDEO
|
||||||
&& st1->codecpar->codec_type == AVMEDIA_TYPE_AUDIO
|
&& st1->codecpar->codec_type == AVMEDIA_TYPE_AUDIO
|
||||||
|
Loading…
Reference in New Issue
Block a user