OSDN Git Service

rv40: prevent undefined signed overflow in rv40_loop_filter()
authorJanne Grunau <janne-libav@jannau.net>
Mon, 13 Feb 2012 21:12:54 +0000 (22:12 +0100)
committerJanne Grunau <janne-libav@jannau.net>
Tue, 14 Feb 2012 13:42:55 +0000 (14:42 +0100)
libavcodec/rv40.c

index c55a07a..04cc4bc 100644 (file)
@@ -357,7 +357,7 @@ static void rv40_loop_filter(RV34DecContext *r, int row)
      * in addition to the coded ones because because they lie at the edge of
      * 8x8 block with different enough motion vectors
      */
-    int mvmasks[4];
+    unsigned mvmasks[4];
 
     mb_pos = row * s->mb_stride;
     for(mb_x = 0; mb_x < s->mb_width; mb_x++, mb_pos++){
@@ -373,7 +373,8 @@ static void rv40_loop_filter(RV34DecContext *r, int row)
         int c_v_deblock[2], c_h_deblock[2];
         int clip_left;
         int avail[4];
-        int y_to_deblock, c_to_deblock[2];
+        unsigned y_to_deblock;
+        int c_to_deblock[2];
 
         q = s->current_picture_ptr->f.qscale_table[mb_pos];
         alpha = rv40_alpha_tab[q];