aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-03-05 00:48:18 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2019-03-21 10:42:52 +0100
commit1d77b60e3531917fe8fef217b54088154b61b675 (patch)
tree84d71e19880fc9e83067ae3d8b243984cea31d62 /libavformat
parent33651c09407e83b011dab95e15b1519bf48cb32e (diff)
downloadffmpeg-1d77b60e3531917fe8fef217b54088154b61b675.tar.gz
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 38381400fca45d1ae6e7604335b507b7dc70a903) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/gdv.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/gdv.c b/libavformat/gdv.c
index a69c349cab..3ead383892 100644
--- a/libavformat/gdv.c
+++ b/libavformat/gdv.c
@@ -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);