You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
avformat/mov: fix potential unsigned underflow in loop condition
if sc->tts_count is 0, this condition will wrap around to UINT_MAX and the code will try to dereference a NULL pointer. Fixes ticket #11417 Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
@ -5191,7 +5191,7 @@ static int mov_read_trak(MOVContext *c, AVIOContext *pb, MOVAtom atom)
|
||||
}
|
||||
|
||||
#if FF_API_R_FRAME_RATE
|
||||
for (int i = 1; sc->stts_count && i < sc->tts_count - 1; i++) {
|
||||
for (unsigned int i = 1; sc->stts_count && i + 1 < sc->tts_count; i++) {
|
||||
if (sc->tts_data[i].duration == sc->tts_data[0].duration)
|
||||
continue;
|
||||
stts_constant = 0;
|
||||
|
Reference in New Issue
Block a user