av_common: check if position is not negative

This commit is contained in:
Kacper Michajłow committed 2025-10-07 07:55:26 +02:00
1 parent a0c4d7b1ca
commit 3d39d992d0
1 file changed
+1 -1
+1 -1
View File
@@ -340,7 +340,7 @@ static void resolve_positional_arg(void *avobj, char **name)
char *end = NULL;
int pos = strtol(*name + 1, &end, 10);
if (!end || *end)
if (!end || *end || pos < 0)
return;
const AVOption *opt = NULL;