diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-10-24 19:23:23 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-10-24 19:23:23 +0200 |
commit | 4641ae352ec587355764ffd5c43dd0d0ebd47654 (patch) | |
tree | da175629ebf72bf55a504dd2d0240b1034892f4e /libavformat/libquvi.c | |
parent | e56425d1a71828c32f7f355f0979534e1007078f (diff) | |
download | ffmpeg-4641ae352ec587355764ffd5c43dd0d0ebd47654.tar.gz |
avformat: Add and use ff_copy_whitelists()
Fixes potential security issue in case of running out of memory
Found-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/libquvi.c')
-rw-r--r-- | libavformat/libquvi.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libavformat/libquvi.c b/libavformat/libquvi.c index 633ff0b470..0a593cc9cf 100644 --- a/libavformat/libquvi.c +++ b/libavformat/libquvi.c @@ -76,9 +76,8 @@ static int libquvi_read_header(AVFormatContext *s) if (rc != QUVI_OK) goto quvi_fail; - av_assert0(!qc->fmtctx->codec_whitelist && !qc->fmtctx->format_whitelist); - qc->fmtctx-> codec_whitelist = av_strdup(s->codec_whitelist); - qc->fmtctx->format_whitelist = av_strdup(s->format_whitelist); + if ((ret = ff_copy_whitelists(qc->fmtctx, s)) < 0) + goto end; ret = avformat_open_input(&qc->fmtctx, media_url, NULL, NULL); if (ret < 0) |