summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-29 02:53:43 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-10-29 02:53:43 +0100
commit224afddc7c869472caa57fc571aaf979a85d24ef (patch)
treef89ebf37b0eff27291e55f4fba35498340d27cfe /tools
parentc5be6192f0a50eb8a2134c32b7d57f1d88736adf (diff)
downloadffmpeg-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.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/ismindex.c b/tools/ismindex.c
index b801d43e8d..9efdebec28 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]);