mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-11 01:25:25 +00:00
avcodec/cpia: Fix missing src_size update
Fixes: out of array read
Fixes: 35210/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CPIA_fuzzer-5669199688105984
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit cea05864e6
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
152ad3a939
commit
74c4d2bfd7
@ -111,6 +111,7 @@ static int cpia_decode_frame(AVCodecContext *avctx,
|
||||
// Read line length, two byte little endian
|
||||
linelength = AV_RL16(src);
|
||||
src += 2;
|
||||
src_size -= 2;
|
||||
|
||||
if (src_size < linelength) {
|
||||
frame->decode_error_flags = FF_DECODE_ERROR_INVALID_BITSTREAM;
|
||||
|
Loading…
Reference in New Issue
Block a user