You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
Make buffer size check consistent and avoid a possible overflow.
This commit is contained in:
@@ -40,7 +40,7 @@ static const uint8_t *avc_mp4_find_startcode(const uint8_t *start, const uint8_t
|
||||
res = (res << 8) | *start++;
|
||||
}
|
||||
|
||||
if (res + start > end) {
|
||||
if (end - start < res) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user