mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-03 12:23:25 +00:00
Dmitry G. Gorbachev (hto at mail cnt dot ru):
NtOpenKey() calls ObpCaptureObjectAttributes() which can return null ObjectName. Then null pointer used in if (ObjectName.Buffer[(ObjectName.Length / sizeof(WCHAR)) - 1] == '\\') which leads to a crash. svn path=/trunk/; revision=25332
This commit is contained in:
@@ -1367,7 +1367,8 @@ NtOpenKey(OUT PHANDLE KeyHandle,
|
||||
return Status;
|
||||
}
|
||||
|
||||
if (ObjectName.Buffer[(ObjectName.Length / sizeof(WCHAR)) - 1] == '\\')
|
||||
if (ObjectName.Buffer &&
|
||||
ObjectName.Buffer[(ObjectName.Length / sizeof(WCHAR)) - 1] == '\\')
|
||||
{
|
||||
ObjectName.Buffer[(ObjectName.Length / sizeof(WCHAR)) - 1] = UNICODE_NULL;
|
||||
ObjectName.Length -= sizeof(WCHAR);
|
||||
|
||||
Reference in New Issue
Block a user