Files
libretroadmin df848e357d compat_getopt: bounded by argc; the harness terminates its argv
getopt_long() scanned for the next option with `for (; argv[idx]; )`,
and took an option's argument from argv[1] unchecked: it relied on the
NULL a real main() places after the last argument. An argv a caller
builds itself may not have one - the threaded-video harness's did
not - and then the scan reads whatever the stack held, which under
gdb on the Windows runner was not a NULL: a segfault in
__getopt_long_retro() from retroarch_main_init(), before the first
lane. The scan and the argument reads are now bounded by argc, so
the parser never looks past what it was given; the harness also
terminates its argv, as a main()'s is.
2026-09-17 15:56:35 +02:00
..
2025-02-09 16:43:51 +01:00