diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2021-05-20 21:16:52 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2021-10-06 14:41:41 +0200 |
commit | 701dc655dae49a0f795708dacc10fc180f2d4044 (patch) | |
tree | a3e406c7cb493ee070b4120ca604bcddf7123dd9 | |
parent | 60d5fa58746ba1023b0d24057b5bdf7fa9856d68 (diff) | |
download | ffmpeg-701dc655dae49a0f795708dacc10fc180f2d4044.tar.gz |
avformat/avio: Check av_opt_copy() for failure
Fixes: CID1477416 Unchecked return value
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit f8611ae1efc47fbe1aff140c89bee4fd1d62d3e1)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavformat/avio.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libavformat/avio.c b/libavformat/avio.c index 237966c303..780f21e32a 100644 --- a/libavformat/avio.c +++ b/libavformat/avio.c @@ -314,8 +314,11 @@ int ffurl_open_whitelist(URLContext **puc, const char *filename, int flags, int ret = ffurl_alloc(puc, filename, flags, int_cb); if (ret < 0) return ret; - if (parent) - av_opt_copy(*puc, parent); + if (parent) { + ret = av_opt_copy(*puc, parent); + if (ret < 0) + goto fail; + } if (options && (ret = av_opt_set_dict(*puc, options)) < 0) goto fail; |