mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-16 04:32:47 +02:00
avformat/dhav: Fix second integer overflow in get_duration()
Fixes: ada-2-poc.dhav
Found-by: Claude and Ada Logics. This issue was found by Anthropic from using agents to study security of open source projects, and I am from Ada Logics helping validate the found issues and report to maintainers.
(cherry picked from commit 50e65074f5)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
committed by
Michael Niedermayer
parent
82f8e69d52
commit
01c828bac1
+1
-1
@@ -279,7 +279,7 @@ static int64_t get_duration(AVFormatContext *s)
|
||||
}
|
||||
}
|
||||
|
||||
if (pos < buffer_pos || pos + 20 > buffer_pos + buffer_size)
|
||||
if (pos < buffer_pos || pos - buffer_pos > buffer_size - 20)
|
||||
goto fail;
|
||||
|
||||
date = AV_RL32(buffer + (pos - buffer_pos) + 16);
|
||||
|
||||
Reference in New Issue
Block a user