summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/cpia.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/cpia.c b/libavcodec/cpia.c
index d88bd1aae7..a2ae16ec2c 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;