summaryrefslogtreecommitdiff
path: root/libavcodec/dsicinvideo.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/dsicinvideo.c')
-rw-r--r--libavcodec/dsicinvideo.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavcodec/dsicinvideo.c b/libavcodec/dsicinvideo.c
index add7afa383..aa080417d2 100644
--- a/libavcodec/dsicinvideo.c
+++ b/libavcodec/dsicinvideo.c
@@ -158,6 +158,9 @@ static int cin_decode_lzss(const unsigned char *src, int src_size,
}
}
+ if (dst_end - dst > dst_size - dst_size/10)
+ return AVERROR_INVALIDDATA;
+
return 0;
}
@@ -184,6 +187,10 @@ static int cin_decode_rle(const unsigned char *src, int src_size,
}
dst += len;
}
+
+ if (dst_end - dst > dst_size - dst_size/10)
+ return AVERROR_INVALIDDATA;
+
return 0;
}