Browse Source

v410dec: Check for sufficient input data. Fixes crash

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
tags/n0.10
Michael Niedermayer Ronald S. Bultje 14 years ago
parent
commit
8f5216905f
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      libavcodec/v410dec.c

+ 5
- 0
libavcodec/v410dec.c View File

@@ -55,6 +55,11 @@ static int v410_decode_frame(AVCodecContext *avctx, void *data,
if (pic->data[0])
avctx->release_buffer(avctx, pic);

if (avpkt->size < 4 * avctx->height * avctx->width) {
av_log(avctx, AV_LOG_ERROR, "Insufficient input data.\n");
return AVERROR(EINVAL);
}

pic->reference = 0;

if (avctx->get_buffer(avctx, pic) < 0) {


Loading…
Cancel
Save