Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

prevent crashing from bad array index

  • Loading branch information...
commit 8f8bfb9ce74691cebdc704a7b65b38a8e0fee69f 1 parent a0dd323
Ching Yi, Chan authored November 09, 2011

Showing 1 changed file with 6 additions and 0 deletions. Show diff stats Hide diff stats

  1. 6  libavcodec/wmv2.c
6  libavcodec/wmv2.c
@@ -85,6 +85,12 @@ void ff_mspel_motion(MpegEncContext *s,
85 85
     src_x = s->mb_x * 16 + (motion_x >> 1);
86 86
     src_y = s->mb_y * 16 + (motion_y >> 1);
87 87
 
  88
+    if(dxy < 0)
  89
+    {
  90
+        av_log(s->avctx, AV_LOG_ERROR, "MUPLAYER-WILL-DIE: bad dxy index\n");
  91
+        return ;
  92
+    }
  93
+
88 94
     /* WARNING: do no forget half pels */
89 95
     v_edge_pos = s->v_edge_pos;
90 96
     src_x = av_clip(src_x, -16, s->width);

0 notes on commit 8f8bfb9

Please sign in to comment.
Something went wrong with that request. Please try again.