[FFmpeg-devel] [PATCH 07/10] fftools/cmdutils: Add protective () to FLAGS

Michael Niedermayer michael at niedermayer.cc
Sun Apr 28 02:54:21 EEST 2024


issue found while reviewing CID1452612 Free of array-typed value

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
 fftools/cmdutils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c
index a8f5c6d89b4..d28f5f3a8bd 100644
--- a/fftools/cmdutils.c
+++ b/fftools/cmdutils.c
@@ -578,7 +578,7 @@ static const AVOption *opt_find(void *obj, const char *name, const char *unit,
     return o;
 }
 
-#define FLAGS (o->type == AV_OPT_TYPE_FLAGS && (arg[0]=='-' || arg[0]=='+')) ? AV_DICT_APPEND : 0
+#define FLAGS ((o->type == AV_OPT_TYPE_FLAGS && (arg[0]=='-' || arg[0]=='+')) ? AV_DICT_APPEND : 0)
 int opt_default(void *optctx, const char *opt, const char *arg)
 {
     const AVOption *o;
-- 
2.43.2



More information about the ffmpeg-devel mailing list