Browse Source

rv20: prevent calling ff_h263_decode_mba() with unset height/width

Prevents a crash of VLC during playback of a invalid matroska file,
found by John Villamil <johnv@matasano.com>.

CC: libav-stable@libav.org
(cherry picked from commit c3e10ae412)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
tags/n0.10.1
Janne Grunau Reinhard Tartler 14 years ago
parent
commit
ba418ad400
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libavcodec/rv10.c

+ 2
- 1
libavcodec/rv10.c View File

@@ -362,7 +362,8 @@ static int rv20_decode_picture_header(MpegEncContext *s)
if(s->avctx->debug & FF_DEBUG_PICT_INFO){
av_log(s->avctx, AV_LOG_DEBUG, "F %d/%d\n", f, rpr_bits);
}
}
} else if (av_image_check_size(s->width, s->height, 0, s->avctx) < 0)
return AVERROR_INVALIDDATA;

mb_pos = ff_h263_decode_mba(s);



Loading…
Cancel
Save