diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2020-11-23 21:42:23 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2021-09-11 21:23:49 +0200 |
commit | bbdd7670535d66f65c2ad22c72316b1f59053881 (patch) | |
tree | 8a8fa8f0abd8504a5c84fa49d1d5c265ea986e2b | |
parent | 27a9a8187542cc66d1ff502b2aefcc34586163a0 (diff) | |
download | ffmpeg-bbdd7670535d66f65c2ad22c72316b1f59053881.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>
(cherry picked from commit f514113cfa9fc44d80086bb2a2b783e8026dc3a9)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-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 828b572f7e..25ee352f8c 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -1108,7 +1108,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) { |