Browse Source

assdec: check that the alloc+init of the private data succeeded.

Fixes a part of Ticket1208

Found-by: John Villamil and Piotr Bandurski
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n0.11
Michael Niedermayer 13 years ago
parent
commit
dd20e7ede5
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavcodec/assdec.c

+ 2
- 0
libavcodec/assdec.c View File

@@ -31,6 +31,8 @@ static av_cold int ass_decode_init(AVCodecContext *avctx)
memcpy(avctx->subtitle_header, avctx->extradata, avctx->extradata_size); memcpy(avctx->subtitle_header, avctx->extradata, avctx->extradata_size);
avctx->subtitle_header_size = avctx->extradata_size; avctx->subtitle_header_size = avctx->extradata_size;
avctx->priv_data = ff_ass_split(avctx->extradata); avctx->priv_data = ff_ass_split(avctx->extradata);
if(!avctx->priv_data)
return -1;
return 0; return 0;
} }




Loading…
Cancel
Save