27 Jan
2026
27 Jan
'26
8:18 a.m.
eric pouech (@epo) commented about programs/start/start.c:
usage(); } else opts.sei.lpDirectory = argv[++i]; + + if (opts.sei.lpDirectory[0] == '\"') + { + int len = wcslen(opts.sei.lpDirectory); + /* no need to free since the process will exit shortly */ + WCHAR* lpDirectory = wcsdup(opts.sei.lpDirectory); + if (lpDirectory[len - 1] == '\"')
you should test that len is not zero before accessing \[len - 1\] -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9946#note_128104