mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-25 08:42:39 +00:00
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 d89930f866
Fixes: CID1618663 Uninitialized scalar variable
This commit is contained in:
parent
b4e64b86ad
commit
8a314e3f11
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user