mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
avformat/wavdec: Check left avio_tell for overflow
Fixes: signed integer overflow: 155 + 9223372036854775655 cannot be represented in type 'long'
Fixes: 51896/clusterfuzz-testcase-minimized-ffmpeg_dem_W64_fuzzer-5364032278495232
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 929ddef3f4
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
c01d304a6b
commit
1718baf61c
@ -767,6 +767,8 @@ smv_out:
|
||||
goto smv_retry;
|
||||
return AVERROR_EOF;
|
||||
}
|
||||
if (INT64_MAX - left < avio_tell(s->pb))
|
||||
return AVERROR_INVALIDDATA;
|
||||
wav->data_end = avio_tell(s->pb) + left;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user