[PATCH 0/1] MR4774: msvcrt: Compare environmental variable names case insensitively
From: Zsolt Vadasz <zsolt_vadasz(a)protonmail.com> Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56134 --- dlls/msvcrt/environ.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/msvcrt/environ.c b/dlls/msvcrt/environ.c index 063a9254c67..5e3abac53c3 100644 --- a/dlls/msvcrt/environ.c +++ b/dlls/msvcrt/environ.c @@ -138,7 +138,7 @@ static int wenv_get_index(const wchar_t *name) len = wcslen(name); for (i = 0; MSVCRT__wenviron[i]; i++) { - if (!wcsncmp(name, MSVCRT__wenviron[i], len) && MSVCRT__wenviron[i][len] == '=') + if (!wcsnicmp(name, MSVCRT__wenviron[i], len) && MSVCRT__wenviron[i][len] == '=') return i; } return i; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/4774
thanks, looks like a regression added recently please update your patch with: * proper test case so that this error doesn't creep in again (like changing case in some of existing tests) * add similar change to ANSI version of APIs which suffers from same bug TIA -- https://gitlab.winehq.org/wine/wine/-/merge_requests/4774#note_56578
participants (3)
-
eric pouech (@epo) -
Zsolt Vadasz -
Zsolt Vadász