[FFmpeg-cvslog] rv34: check for size mismatch

Michael Niedermayer git at videolan.org
Sun Nov 6 20:18:52 CET 2011


ffmpeg | branch: release/0.5 | Michael Niedermayer <michaelni at gmx.at> | Sat Sep 17 19:40:25 2011 +0200| [1883249be396b8dd6b67f8750749bef61dd24525] | committer: Michael Niedermayer

rv34: check for size mismatch

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 35f38b3ab9d755aede5bce8abbe1cb9c07027f8a)
(cherry picked from commit ed9e561490d70e317659f9e406c7920242e509eb)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1883249be396b8dd6b67f8750749bef61dd24525
---

 libavcodec/rv34.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/libavcodec/rv34.c b/libavcodec/rv34.c
index da20dbb..c4e3621 100644
--- a/libavcodec/rv34.c
+++ b/libavcodec/rv34.c
@@ -1276,6 +1276,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;



More information about the ffmpeg-cvslog mailing list