summaryrefslogtreecommitdiff
path: root/libavcodec/rv34.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-09-17 19:40:25 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-09-17 20:17:10 +0200
commit35f38b3ab9d755aede5bce8abbe1cb9c07027f8a (patch)
tree36c31ffcf42f38f0d22588c06884fa9b35c3c362 /libavcodec/rv34.c
parenta5dc990a4eec13320e97f287640138e549d99d88 (diff)
rv34: check for size mismatch
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/rv34.c')
-rw-r--r--libavcodec/rv34.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/rv34.c b/libavcodec/rv34.c
index 62425a06fe..ca727a5500 100644
--- a/libavcodec/rv34.c
+++ b/libavcodec/rv34.c
@@ -1343,6 +1343,10 @@ static int rv34_decode_slice(RV34DecContext *r, int end, const uint8_t* buf, int
av_log(s->avctx, AV_LOG_ERROR, "Slice type mismatch\n");
return AVERROR_INVALIDDATA;
}
+ if (s->width != r->si.width || s->height != r->si.height) {
+ av_log(s->avctx, AV_LOG_ERROR, "Size mismatch\n");
+ return AVERROR_INVALIDDATA;
+ }
}
r->si.end = end;