diff mbox series

[FFmpeg-devel,6/8] avformat/avs: Use 64bit for the avio_tell() output

Message ID 20201024222312.5806-6-michael@niedermayer.cc
State Accepted
Commit 1278f117d75ab9238ef181ba29b31c6ea569571b
Headers show
Series [FFmpeg-devel,1/8] tools/target_dem_fuzzer: Limit max blocks
Related show

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished

Commit Message

Michael Niedermayer Oct. 24, 2020, 10:23 p.m. UTC
Fixes: signed integer overflow: 9223372036854775807 - -1 cannot be represented in type 'long'
Fixes: 26549/clusterfuzz-testcase-minimized-ffmpeg_dem_AVS_fuzzer-4844306424397824

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavformat/avs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Michael Niedermayer Nov. 22, 2020, 4:40 p.m. UTC | #1
On Sun, Oct 25, 2020 at 12:23:10AM +0200, Michael Niedermayer wrote:
> Fixes: signed integer overflow: 9223372036854775807 - -1 cannot be represented in type 'long'
> Fixes: 26549/clusterfuzz-testcase-minimized-ffmpeg_dem_AVS_fuzzer-4844306424397824
> 
> Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
>  libavformat/avs.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

will apply

[...]
diff mbox series

Patch

diff --git a/libavformat/avs.c b/libavformat/avs.c
index 54b2c3f2a9..097c171908 100644
--- a/libavformat/avs.c
+++ b/libavformat/avs.c
@@ -128,7 +128,8 @@  avs_read_video_packet(AVFormatContext * s, AVPacket * pkt,
 static int avs_read_audio_packet(AVFormatContext * s, AVPacket * pkt)
 {
     AvsFormat *avs = s->priv_data;
-    int ret, size;
+    int ret;
+    int64_t size;
 
     size = avio_tell(s->pb);
     ret = ff_voc_get_packet(s, pkt, avs->st_audio, avs->remaining_audio_size);