summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/dca.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/dca.c b/libavcodec/dca.c
index a5470073f0..1c040e21ee 100644
--- a/libavcodec/dca.c
+++ b/libavcodec/dca.c
@@ -1089,6 +1089,9 @@ static int dca_convert_bitstream(uint8_t * src, int src_size, uint8_t * dst,
uint16_t *ssrc = (uint16_t *) src, *sdst = (uint16_t *) dst;
PutBitContext pb;
+ if((unsigned)src_size > (unsigned)max_size)
+ return -1;
+
mrk = AV_RB32(src);
switch (mrk) {
case DCA_MARKER_RAW_BE: