Jacek Caban (@jacek) commented about dlls/wininet/tests/url.c:
ok(r, "InternetCrackUrlW failed with error %ld\n", GetLastError()); ok(comp.dwUrlPathLength == 0, "Expected dwUrlPathLength of 0, got %ld\n", comp.dwUrlPathLength); + + /* file:// URLs with empty path and fragment/query immediately after // + * These previously caused a crash (STATUS_STACK_OVERFLOW) due to tmppath[-1] + * array underflow in InternetCrackUrlW when path length was 0. */ + { + static const WCHAR file_hash[] = L"file://#:]"; + static const WCHAR file_frag[] = L"file://#frag";
Please avoid blocks just for sake of declaring variables. In this case, you don't really need those variables and you could just inline those strings. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11347#note_145862