reactos/dll/win32/advapi32
Timo Kreuzer c5158963a3 [ADVAPI32] Fix a buffer overflow in RegQueryValueExA
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.
2023-01-04 10:32:28 +01:00
..
misc [ADVAPI32] Implement security descriptor management in CreateProcessAsUserCommon internal function 2022-05-06 10:09:50 +02:00
reg [ADVAPI32] Fix a buffer overflow in RegQueryValueExA 2023-01-04 10:32:28 +01:00
sec
service
token
wine [SECLOGON][ADVAPI] CreateProcessWithLogonW: Return process information to the caller 2022-07-24 01:08:13 +02:00
advapi32.h
advapi32.rc
advapi32.spec
CMakeLists.txt