[FFmpeg-cvslog] avformat/bfi: check nframes

2021-09-08 Thread Michael Niedermayer
ffmpeg | branch: release/4.4 | Michael Niedermayer  | 
Fri Apr 23 19:33:58 2021 +0200| [6d86416c92c127de23f5d62fa5d40cf3613c4b14] | 
committer: Michael Niedermayer

avformat/bfi: check nframes

Fixes: signed integer overflow: -2147483648 - 1 cannot be represented in type 
'int'
Fixes: 
29102/clusterfuzz-testcase-minimized-ffmpeg_dem_BFI_fuzzer-6737028768202752

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer 
(cherry picked from commit b4e77dfca1c2970446f79277034d8e60c3fe3f4e)
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6d86416c92c127de23f5d62fa5d40cf3613c4b14
---

 libavformat/bfi.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/bfi.c b/libavformat/bfi.c
index 2dab986f3a..f9e0bb2e30 100644
--- a/libavformat/bfi.c
+++ b/libavformat/bfi.c
@@ -73,6 +73,8 @@ static int bfi_read_header(AVFormatContext * s)
 return AVERROR_INVALIDDATA;
 
 bfi->nframes   = avio_rl32(pb);
+if (bfi->nframes < 0)
+return AVERROR_INVALIDDATA;
 avio_rl32(pb);
 avio_rl32(pb);
 avio_rl32(pb);

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avformat/bfi: check nframes

2021-07-31 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Fri 
Apr 23 19:33:58 2021 +0200| [b4e77dfca1c2970446f79277034d8e60c3fe3f4e] | 
committer: Michael Niedermayer

avformat/bfi: check nframes

Fixes: signed integer overflow: -2147483648 - 1 cannot be represented in type 
'int'
Fixes: 
29102/clusterfuzz-testcase-minimized-ffmpeg_dem_BFI_fuzzer-6737028768202752

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b4e77dfca1c2970446f79277034d8e60c3fe3f4e
---

 libavformat/bfi.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/bfi.c b/libavformat/bfi.c
index bff6f0154e..69000118fa 100644
--- a/libavformat/bfi.c
+++ b/libavformat/bfi.c
@@ -73,6 +73,8 @@ static int bfi_read_header(AVFormatContext * s)
 return AVERROR_INVALIDDATA;
 
 bfi->nframes   = avio_rl32(pb);
+if (bfi->nframes < 0)
+return AVERROR_INVALIDDATA;
 avio_rl32(pb);
 avio_rl32(pb);
 avio_rl32(pb);

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".