diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-29 02:53:43 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-29 02:53:43 +0100 |
commit | 224afddc7c869472caa57fc571aaf979a85d24ef (patch) | |
tree | f89ebf37b0eff27291e55f4fba35498340d27cfe /tools | |
parent | c5be6192f0a50eb8a2134c32b7d57f1d88736adf (diff) | |
download | ffmpeg-streaming-224afddc7c869472caa57fc571aaf979a85d24ef.zip ffmpeg-streaming-224afddc7c869472caa57fc571aaf979a85d24ef.tar.gz |
ismindex: check return value of avio_open_dyn_buf()
Fixes CID733723
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/ismindex.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/ismindex.c b/tools/ismindex.c index b801d43..9efdebe 100644 --- a/tools/ismindex.c +++ b/tools/ismindex.c @@ -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]); |