aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarvin Scholz <epirat07@gmail.com>2024-08-28 03:08:39 +0200
committerTimo Rothenpieler <timo@rothenpieler.org>2024-09-07 20:42:26 +0200
commit8a314e3f11dc6549a2b1aa4a7cefa2a44aca2827 (patch)
treeb50cc32258f68784304bdc6fb65c3b91509bd605
parentb4e64b86ad92ce83d7befeaa1245416cf6eadd27 (diff)
downloadffmpeg-8a314e3f11dc6549a2b1aa4a7cefa2a44aca2827.tar.gz
lavu/opt: Fix return of uninitialised value
In one of the failure paths of av_opt_get_array, the ret variable was accidentally declared again, shadowing the outer one and once when jumping to the fail label would return the still uninitialised outer one. To fix this simply remove the local declaration of ret that shadowed the outer one. Introduced in d89930f8666c563a96f1dc1835b450522b4cd6da Fixes: CID1618663 Uninitialized scalar variable
-rw-r--r--libavutil/opt.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/libavutil/opt.c b/libavutil/opt.c
index cc964809c4..45db4f484f 100644
--- a/libavutil/opt.c
+++ b/libavutil/opt.c
@@ -2214,7 +2214,6 @@ int av_opt_get_array(void *obj, const char *name, int search_flags,
double num = 1.0;
int den = 1;
int64_t intnum = 1;
- int ret;
ret = read_number(o, src, &num, &den, &intnum);
if (ret < 0)