Description:
When flags does not include DT_CALCRECT, since len is calculated in the middle,
it will be reduced to zero. Resulting in the length of the processed string that
is finally returned to zero and the non-processing string length is unchanged.
But some application taking the non-processing string length to zero as the loop
end condition.
Log:
Signed-off-by: chenjiangyi <chenjiangyi(a)uniontech.com>
Change-Id: Icc0f250f5f4faba1bee8326fc911a4fc9cd7c012
--
v2: user32: Fix the number of characters processed by DrawTextExW.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4812
I had a bugreport here: https://bugs.winehq.org/show_bug.cgi?id=56161
This pull req fixes the bug that programs that do VirtualAlloc(placeholder)/VirtualFree(keep placeholder)/MapViewOfFile3(replace placeholder), do not run. Like the dotnet pe loader in .net 7 for example.
It was not clear to me at first, because i didnt notice it on msdn, but the way that Dmitry Timoshkov
"hacked" it in https://bugs.winehq.org/show_bug.cgi?id=56122 is actually exactly how it is supposed to happen according to msdn.
From here: https://learn.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-…

So thanks to Dmitry Timoshkov.
If you are interested you could also look into the thing i mentioned in the bug report, that MapViewOfFile3 doesn't round down to 64k, but, i don't think this is a serious problem yet.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4822
LANCommander calls NtMapViewOfSectionEx with
alloc_type=MEM_REPLACE_PLACEHOLDER, but you couldn't tell from the
trace.
--
v3: ntdll: Include alloc_type argument in NtMapViewOfSection(Ex) traces.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4788
Avoids conflicts with the dinput tests somehow.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52962
The dinput tests have been using that too for a long while without any known issues. It also makes the tests more robust to interruptions and IME have been able to get back to a working state after a test failed to properly uninstall devices.
(I've tried renaming dinput inf strings and files to something else but for some reason that's not enough and ntoskrnl.exe tests still fail on this call)
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4819
When threaded locales are not enabled but an app is using setlocale() concurrently, create_locinfo() may use old locale after free. That happens because the reference is held from thread data, but some functions called from within create_locinfo() can get_locinfo() (->update_thread_locale) and that may result in freeing the old locinfo.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4816