1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-13 21:28:01 +02:00

avformat/gdv: Check fps

Fixes: Division by 0
Fixes: ffmpeg_zero_division.bin

Found-by: Anatoly Trosinenko <anatoly.trosinenko@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 38381400fc)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2019-03-05 00:48:18 +01:00
parent 6689435190
commit 2d825946a3

View File

@ -86,6 +86,9 @@ static int gdv_read_header(AVFormatContext *ctx)
vst->nb_frames = avio_rl16(pb);
fps = avio_rl16(pb);
if (!fps)
return AVERROR_INVALIDDATA;
snd_flags = avio_rl16(pb);
if (snd_flags & 1) {
ast = avformat_new_stream(ctx, 0);