mirror of
https://github.com/reactos/reactos.git
synced 2025-04-27 17:10:22 +00:00
Check result of ANSI -> Unicode conversion, which can fail in the case of
memory shortage. svn path=/trunk/; revision=26741
This commit is contained in:
parent
a6e430f084
commit
7bef6e865e
1 changed files with 7 additions and 1 deletions
|
@ -1329,12 +1329,18 @@ LdrpGetOrLoadModule(PWCHAR SerachPath,
|
|||
PLDR_DATA_TABLE_ENTRY* Module,
|
||||
BOOLEAN Load)
|
||||
{
|
||||
ANSI_STRING AnsiDllName;
|
||||
UNICODE_STRING DllName;
|
||||
NTSTATUS Status;
|
||||
|
||||
DPRINT("LdrpGetOrLoadModule() called for %s\n", Name);
|
||||
|
||||
RtlCreateUnicodeStringFromAsciiz (&DllName, Name);
|
||||
RtlInitAnsiString(&AnsiDllName, Name);
|
||||
Status = RtlAnsiStringToUnicodeString(&DllName, &AnsiDllName, TRUE);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
return Status;
|
||||
}
|
||||
|
||||
Status = LdrFindEntryForName (&DllName, Module, Load);
|
||||
if (Load && !NT_SUCCESS(Status))
|
||||
|
|
Loading…
Reference in a new issue