summaryrefslogtreecommitdiff
path: root/libavcodec/indeo3.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-11-24 22:39:23 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-11-24 22:39:23 +0100
commite421b79d01a3bf18d1ff8d8c4639669b66d788a5 (patch)
tree97200906fb48651160c55c4fce07f2cd1d74f100 /libavcodec/indeo3.c
parenteb511ef6363af8df6f842b7f5dc37fadbc15c8dd (diff)
indeo3: fix null pointer dereference in vulnerable.mov
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/indeo3.c')
-rw-r--r--libavcodec/indeo3.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c
index a5146e8b87..22984db66e 100644
--- a/libavcodec/indeo3.c
+++ b/libavcodec/indeo3.c
@@ -226,8 +226,11 @@ static void copy_cell(Indeo3DecodeContext *ctx, Plane *plane, Cell *cell)
/* setup output and reference pointers */
offset_dst = (cell->ypos << 2) * plane->pitch + (cell->xpos << 2);
dst = plane->pixels[ctx->buf_sel] + offset_dst;
+ if(cell->mv_ptr){
mv_y = cell->mv_ptr[0];
mv_x = cell->mv_ptr[1];
+ }else
+ mv_x= mv_y= 0;
offset = offset_dst + mv_y * plane->pitch + mv_x;
src = plane->pixels[ctx->buf_sel ^ 1] + offset;