mirror of
https://github.com/reactos/reactos.git
synced 2025-01-05 22:12:46 +00:00
[NTOSKRNL]
- Fix a string termination bug in the device interface code - Thanks to janderwald for spotting the bug svn path=/trunk/; revision=47801
This commit is contained in:
parent
e5bc385e89
commit
b00db8b8a6
1 changed files with 5 additions and 3 deletions
|
@ -105,18 +105,20 @@ OpenRegistryHandlesFromSymbolicLink(IN PUNICODE_STRING SymbolicLinkName,
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
SubKeyName.Buffer = ExAllocatePool(PagedPool, SymbolicLinkName->Length);
|
SubKeyName.MaximumLength = SymbolicLinkName->Length + sizeof(WCHAR);
|
||||||
|
SubKeyName.Length = 0;
|
||||||
|
SubKeyName.Buffer = ExAllocatePool(PagedPool, SubKeyName.MaximumLength);
|
||||||
if (!SubKeyName.Buffer)
|
if (!SubKeyName.Buffer)
|
||||||
{
|
{
|
||||||
Status = STATUS_INSUFFICIENT_RESOURCES;
|
Status = STATUS_INSUFFICIENT_RESOURCES;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
SubKeyName.MaximumLength = SymbolicLinkName->Length;
|
|
||||||
SubKeyName.Length = 0;
|
|
||||||
|
|
||||||
RtlAppendUnicodeStringToString(&SubKeyName,
|
RtlAppendUnicodeStringToString(&SubKeyName,
|
||||||
SymbolicLinkName);
|
SymbolicLinkName);
|
||||||
|
|
||||||
|
SubKeyName.Buffer[SubKeyName.Length / sizeof(WCHAR)] = UNICODE_NULL;
|
||||||
|
|
||||||
SubKeyName.Buffer[0] = L'#';
|
SubKeyName.Buffer[0] = L'#';
|
||||||
SubKeyName.Buffer[1] = L'#';
|
SubKeyName.Buffer[1] = L'#';
|
||||||
SubKeyName.Buffer[2] = L'?';
|
SubKeyName.Buffer[2] = L'?';
|
||||||
|
|
Loading…
Reference in a new issue