diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2021-06-21 23:59:04 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2021-10-06 14:54:16 +0300 |
commit | 81bddb185998f421285ce288eeed8285cc4dd641 (patch) | |
tree | 18d66e220d207b61d8ff1ce3b2dbec4c59fe5292 /libavcodec | |
parent | f806412b005483bf02a7224dd3c90a88551e82a7 (diff) |
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 cea05864e65db9a2dc8af82b2c63fb8f03c5f876)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/cpia.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/cpia.c b/libavcodec/cpia.c index f6d7332606..1be47cf5d2 100644 --- a/libavcodec/cpia.c +++ b/libavcodec/cpia.c @@ -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; |