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 450a3f58edb22d28912a5e65dc08d9e2fb805066
Unified · Split
| @@ -2368,7 +2368,6 @@ int av_opt_set_array(void *obj, const char *name, int search_flags, · 2367 unmodified lines | ||
| 2368 | 2368 | val_type == AV_OPT_TYPE_FLOAT || |
| 2369 | 2369 | val_type == AV_OPT_TYPE_DOUBLE || |
| 2370 | 2370 | val_type == AV_OPT_TYPE_RATIONAL) { |
| 2371 | − int ret; | |
| 2372 | 2371 | |
| 2373 | 2372 | switch (val_type) { |
| 2374 | 2373 | case AV_OPT_TYPE_INT: intnum = *(int*)src; break; |