diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2020-11-23 21:42:23 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2021-02-10 21:18:16 +0100 |
commit | f514113cfa9fc44d80086bb2a2b783e8026dc3a9 (patch) | |
tree | 54e921909efebdef6757c5145c956642efcea140 /libavformat | |
parent | 0b78016b2d7c36b32d07669c0c86bc4b4225ec98 (diff) | |
download | ffmpeg-f514113cfa9fc44d80086bb2a2b783e8026dc3a9.tar.gz |
avformat/flvdec: Treat high ts byte as unsigned
Fixes: left shift of 255 by 24 places cannot be represented in type 'int'
Fixes: 27516/clusterfuzz-testcase-minimized-ffmpeg_dem_KUX_fuzzer-5152854660349952
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/flvdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index 943c0278e5..30d1fcf4b7 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -1174,7 +1174,7 @@ retry_duration: avio_seek(s->pb, fsize - 3 - size, SEEK_SET); if (size == avio_rb24(s->pb) + 11) { uint32_t ts = avio_rb24(s->pb); - ts |= avio_r8(s->pb) << 24; + ts |= (unsigned)avio_r8(s->pb) << 24; if (ts) s->duration = ts * (int64_t)AV_TIME_BASE / 1000; else if (fsize >= 8 && fsize - 8 >= size) { |