Browse code

Reject slices that does not have the same type than the first one in RV10/RV20 decoder.

This prevents crashes with some corrupted bitstreams.

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

Laurent Aimar authored on 2011/09/18 07:17:44
Showing 1 changed files
... ...
@@ -547,8 +547,12 @@ static int rv10_decode_packet(AVCodecContext *avctx,
547 547
         if(MPV_frame_start(s, avctx) < 0)
548 548
             return -1;
549 549
         ff_er_frame_start(s);
550
+    } else {
551
+        if (s->current_picture_ptr->f.pict_type != s->pict_type)
552
+            return -1;
550 553
     }
551 554
 
555
+
552 556
     av_dlog(avctx, "qscale=%d\n", s->qscale);
553 557
 
554 558
     /* default quantization values */