[FFmpeg-devel] [PATCH] avcodec/bitstream_filter: Check return code of av_opt_set_from_string()

Michael Niedermayer michael at niedermayer.cc
Thu May 19 13:29:24 CEST 2016


Fixes CID1361965

Iam not 100% sure this doesnt break some case, if it does please
tell me. Ill fix it

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
 libavcodec/bitstream_filter.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/bitstream_filter.c b/libavcodec/bitstream_filter.c
index 02878e3..4459bbb 100644
--- a/libavcodec/bitstream_filter.c
+++ b/libavcodec/bitstream_filter.c
@@ -123,6 +123,8 @@ int av_bitstream_filter_filter(AVBitStreamFilterContext *bsfc,
                 shorthand[0] = opt->name;
 
             ret = av_opt_set_from_string(priv->ctx->priv_data, bsfc->args, shorthand, "=", ":");
+            if (ret < 0)
+                return ret;
         }
 
         ret = av_bsf_init(priv->ctx);
-- 
1.7.9.5



More information about the ffmpeg-devel mailing list