Browse Source

avcodec/vc1dec: Check buf2 for malloc failure

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.7
Michael Niedermayer 10 years ago
parent
commit
a66dcfeedc
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      libavcodec/vc1dec.c

+ 3
- 0
libavcodec/vc1dec.c View File

@@ -483,6 +483,9 @@ static av_cold int vc1_decode_init(AVCodecContext *avctx)
}

buf2 = av_mallocz(avctx->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
if (!buf2)
return AVERROR(ENOMEM);

start = find_next_marker(start, end); // in WVC1 extradata first byte is its size, but can be 0 in mkv
next = start;
for (; next < end; start = next) {


Loading…
Cancel
Save