Browse Source

ismindex: check return value of avio_open_dyn_buf()

Fixes CID733723
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n1.1
Michael Niedermayer 12 years ago
parent
commit
224afddc7c
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      tools/ismindex.c

+ 4
- 1
tools/ismindex.c View File

@@ -251,7 +251,10 @@ static int get_video_private_data(struct VideoFile *vf, AVCodecContext *codec)
if (codec->codec_id == AV_CODEC_ID_VC1)
return get_private_data(vf, codec);

avio_open_dyn_buf(&io);
if (avio_open_dyn_buf(&io) < 0) {
err = AVERROR(ENOMEM);
goto fail;
}
if (codec->extradata_size < 11 || codec->extradata[0] != 1)
goto fail;
sps_size = AV_RB16(&codec->extradata[6]);


Loading…
Cancel
Save