mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
![]() The code was trying to check whether the output string was already NULL terminated by RtlUnicodeToMultiByteN before NULL terminating it by checking DataStr[*count - 1] for a NULL terminator. But since RtlUnicodeToMultiByteSize always returns the size without the NULL terminator, DataStr[*count - 1] would always be the last actual character, never an optional NULL terminator. For 0 sized strings this would actually lead to accessing the output buffer at position -1 (on 32 bit) or 0xFFFFFFFF (on 64 bit). Fix this by removing the check. This fixes a crash in advapi32_winetest:registry on x64. |
||
---|---|---|
.. | ||
3rdparty | ||
apisets | ||
appcompat | ||
cpl | ||
directx | ||
keyboard | ||
nls | ||
np | ||
ntdll | ||
opengl | ||
shellext | ||
win32 | ||
CMakeLists.txt |