mirror of
https://mirror.skon.top/https://github.com/FFmpeg/FFmpeg
synced 2026-04-30 13:50:50 +08:00
lavu/opt: av_opt_set_array: fix uninitialised return
In one failure path for av_opt_set_array, the ret variable
was declared again, shadowing the outer one and writing the
return value to the wrong one and then after the goto returning
the uninitialized one instead.
Introduced in 450a3f58ed
Fixes: CID1619242 Uninitialized scalar variable
This commit is contained in:
committed by
Timo Rothenpieler
parent
7e35aeda03
commit
b4e64b86ad
@@ -2368,7 +2368,6 @@ int av_opt_set_array(void *obj, const char *name, int search_flags,
|
||||
val_type == AV_OPT_TYPE_FLOAT ||
|
||||
val_type == AV_OPT_TYPE_DOUBLE ||
|
||||
val_type == AV_OPT_TYPE_RATIONAL) {
|
||||
int ret;
|
||||
|
||||
switch (val_type) {
|
||||
case AV_OPT_TYPE_INT: intnum = *(int*)src; break;
|
||||
|
||||
Reference in New Issue
Block a user