You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
avformat/dhav: fix reference point mixup
Fixes: reading the duration from before the start of the allocated buffer.
Regression since: 36ec9217e6
Fixes: BIGSLEEP-433513232/test
Found-by: Google Big Sleep
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@ -279,7 +279,7 @@ static int64_t get_duration(AVFormatContext *s)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (end_pos < 0 || end_pos + 16 > end_buffer_pos + end_buffer_size)
|
if (end_pos < end_buffer_pos || end_pos + 16 > end_buffer_pos + end_buffer_size)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
date = AV_RL32(end_buffer + (end_pos - end_buffer_pos) + 16);
|
date = AV_RL32(end_buffer + (end_pos - end_buffer_pos) + 16);
|
||||||
|
Reference in New Issue
Block a user