aboutsummaryrefslogtreecommitdiff
path: root/gst-libs/ext/libav/libavcodec/zmbv.c
diff options
context:
space:
mode:
Diffstat (limited to 'gst-libs/ext/libav/libavcodec/zmbv.c')
-rw-r--r--gst-libs/ext/libav/libavcodec/zmbv.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gst-libs/ext/libav/libavcodec/zmbv.c b/gst-libs/ext/libav/libavcodec/zmbv.c
index c92e553..c7a90f0 100644
--- a/gst-libs/ext/libav/libavcodec/zmbv.c
+++ b/gst-libs/ext/libav/libavcodec/zmbv.c
@@ -508,8 +508,11 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPac
}
if (c->comp == 0) { //Uncompressed data
+ if (c->decomp_size < len) {
+ av_log(avctx, AV_LOG_ERROR, "Buffer too small\n");
+ return AVERROR_INVALIDDATA;
+ }
memcpy(c->decomp_buf, buf, len);
- c->decomp_size = 1;
} else { // ZLIB-compressed data
c->zstream.total_in = c->zstream.total_out = 0;
c->zstream.next_in = buf;