1
0
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:
Michael Niedermayer
2025-07-28 15:34:27 +02:00
parent 15cec71665
commit 33ae6cda71

View File

@ -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;
date = AV_RL32(end_buffer + (end_pos - end_buffer_pos) + 16);