diff options
author | Michael Niedermayer <[email protected]> | 2020-11-23 21:42:23 +0100 |
---|---|---|
committer | Michael Niedermayer <[email protected]> | 2021-09-10 16:04:26 +0200 |
commit | 7cf8366fe56d045c5c37d41db39c5bf58083ad51 (patch) | |
tree | 8996ae5487faec83a4be9806fb16478825fc661b | |
parent | fcbcc75059dbb47691acd3575ab9d0c99b532627 (diff) |
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 <[email protected]>
(cherry picked from commit f514113cfa9fc44d80086bb2a2b783e8026dc3a9)
Signed-off-by: Michael Niedermayer <[email protected]>
-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 0288cd376b..835cdf8d9a 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -1180,7 +1180,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) { |