You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avcodec/iff: add forgotten checks for end of input buffer
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
@@ -1247,7 +1247,7 @@ static void decode_delta_d(uint8_t *dst,
|
||||
bytestream2_init(&gb, buf + ofssrc, buf_end - (buf + ofssrc));
|
||||
|
||||
entries = bytestream2_get_be32(&gb);
|
||||
while (entries) {
|
||||
while (entries && bytestream2_get_bytes_left(&gb) >= 8) {
|
||||
int32_t opcode = bytestream2_get_be32(&gb);
|
||||
unsigned offset = bytestream2_get_be32(&gb);
|
||||
|
||||
@@ -1302,7 +1302,7 @@ static void decode_delta_e(uint8_t *dst,
|
||||
bytestream2_init(&gb, buf + ofssrc, buf_end - (buf + ofssrc));
|
||||
|
||||
entries = bytestream2_get_be16(&gb);
|
||||
while (entries) {
|
||||
while (entries && bytestream2_get_bytes_left(&gb) >= 6) {
|
||||
int16_t opcode = bytestream2_get_be16(&gb);
|
||||
unsigned offset = bytestream2_get_be32(&gb);
|
||||
|
||||
|
Reference in New Issue
Block a user