History

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

Marvin Scholz committed 2 years ago

Commit 8a314e31 parent b4e64b81 file · +0 −1Browse files

Unified · Split

libavutil/opt.c+0−1
@@ -2214,7 +2214,6 @@ int av_opt_get_array(void *obj, const char *name, int search_flags, · 2213 unmodified lines
22142214 double num = 1.0;
22152215 int den = 1;
22162216 int64_t intnum = 1;
2217− int ret;
22182217
22192218 ret = read_number(o, src, &num, &den, &intnum);
22202219 if (ret < 0)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t