mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
avformat/vividas: Make len signed
Fixes: out of array access Fixes: 27424/clusterfuzz-testcase-minimized-ffmpeg_dem_VIVIDAS_fuzzer-5682070692823040 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 b29d351f972f801d0374ca8565cee398b8f69160) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
eeef4189a4
commit
be6695995d
@ -389,8 +389,8 @@ static int track_header(VividasDemuxContext *viv, AVFormatContext *s, uint8_t *
|
||||
ffio_read_varlen(pb); // len_3
|
||||
num_data = avio_r8(pb);
|
||||
for (j = 0; j < num_data; j++) {
|
||||
uint64_t len = ffio_read_varlen(pb);
|
||||
if (len > INT_MAX/2 - xd_size) {
|
||||
int64_t len = ffio_read_varlen(pb);
|
||||
if (len < 0 || len > INT_MAX/2 - xd_size) {
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
data_len[j] = len;
|
||||
|
Loading…
x
Reference in New Issue
Block a user