mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-11 09:20:01 +01:00
avcodec/parser: ensure input padding is zeroed
Fixes use of uninitialized value, reported by MSAN.
Found by OSS-Fuzz.
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
Fixes: 70852/clusterfuzz-testcase-minimized-ffmpeg_IO_DEMUXER_fuzzer-5179190066872320
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 5dfc0cc841)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
committed by
Michael Niedermayer
parent
67fcbe528c
commit
66ba00b9da
@@ -232,6 +232,7 @@ int ff_combine_frame(ParseContext *pc, int next,
|
||||
}
|
||||
pc->buffer = new_buffer;
|
||||
memcpy(&pc->buffer[pc->index], *buf, *buf_size);
|
||||
memset(&pc->buffer[pc->index + *buf_size], 0, AV_INPUT_BUFFER_PADDING_SIZE);
|
||||
pc->index += *buf_size;
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user