mirror of
https://github.com/reactos/reactos
synced 2025-10-06 00:12:51 +02:00
[NTDLL] check for NULL buffer in LdrpLoadDll
This happens in advapi32_apitest in Test_CreateOpenKey.
This commit is contained in:
@@ -2428,6 +2428,12 @@ LdrpLoadDll(IN BOOLEAN Redirected,
|
||||
PLDR_DATA_TABLE_ENTRY LdrEntry;
|
||||
BOOLEAN InInit = LdrpInLdrInit;
|
||||
|
||||
if (DllName->Buffer == NULL)
|
||||
{
|
||||
DPRINT1("DllName->Buffer is NULL!\n");
|
||||
return STATUS_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
/* Save the Raw DLL Name */
|
||||
if (DllName->Length >= sizeof(NameBuffer)) return STATUS_NAME_TOO_LONG;
|
||||
RtlInitEmptyUnicodeString(&RawDllName, NameBuffer, sizeof(NameBuffer));
|
||||
|
Reference in New Issue
Block a user