On 7/27/2012 7:01 PM, Kostya Shishkov wrote:
On Fri, Jul 27, 2012 at 06:49:42PM +0600, Mashiat Sarker Shakkhar wrote:
From: Michael Niedermayer <michae...@gmx.at>

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michae...@gmx.at>
---
  libavcodec/vc1dec.c |    4 ++++
  1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index e34e8d2..c63ccf1 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -5600,6 +5600,10 @@ static int vc1_decode_frame(AVCodecContext *avctx, void 
*data,
                  s->end_mb_y = (i == n_slices     ) ? mb_height : 
FFMIN(mb_height, slices[i].mby_start % mb_height);
              else
                  s->end_mb_y = (i <= n_slices1 + 1) ? mb_height : 
FFMIN(mb_height, slices[i].mby_start % mb_height);
+            if (s->end_mb_y <= s->start_mb_y) {
+                av_log(v->s.avctx, AV_LOG_ERROR, "end mb y %d %d invalid\n", 
s->end_mb_y, s->start_mb_y);
+                continue;
+            }
              vc1_decode_blocks(v);
              if (i != n_slices)
                  s->gb = slices[i].gb;
--

looks OK except for cryptic message

I will consider this dropped unless someone improves it to take one MB high pictures (possible in theory) into account.
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to