mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
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>
This commit is contained in:
parent
0b78016b2d
commit
f514113cfa
@ -1174,7 +1174,7 @@ retry_duration:
|
|||||||
avio_seek(s->pb, fsize - 3 - size, SEEK_SET);
|
avio_seek(s->pb, fsize - 3 - size, SEEK_SET);
|
||||||
if (size == avio_rb24(s->pb) + 11) {
|
if (size == avio_rb24(s->pb) + 11) {
|
||||||
uint32_t ts = avio_rb24(s->pb);
|
uint32_t ts = avio_rb24(s->pb);
|
||||||
ts |= avio_r8(s->pb) << 24;
|
ts |= (unsigned)avio_r8(s->pb) << 24;
|
||||||
if (ts)
|
if (ts)
|
||||||
s->duration = ts * (int64_t)AV_TIME_BASE / 1000;
|
s->duration = ts * (int64_t)AV_TIME_BASE / 1000;
|
||||||
else if (fsize >= 8 && fsize - 8 >= size) {
|
else if (fsize >= 8 && fsize - 8 >= size) {
|
||||||
|
Loading…
Reference in New Issue
Block a user