Fixed bug with calling RtlFreeUnicodeString too early in LdrFixupForward

svn path=/trunk/; revision=1735
This commit is contained in:
David Welch 2001-03-26 16:33:10 +00:00
parent b1601c09d8
commit 51a205bc71
3 changed files with 22 additions and 10 deletions

View file

@ -56,7 +56,7 @@ NET_DEVICE_DRIVERS = ne2000
SYS_APPS = shell winlogon services SYS_APPS = shell winlogon services
APPS = args hello test cat bench apc shm lpc thread event file gditest \ APPS = args hello test cat bench apc shm lpc thread event file gditest \
pteb consume dump_shared_data vmtest regtest alive pteb consume dump_shared_data vmtest regtest alive uitest
# objdir # objdir

View file

@ -1,4 +1,4 @@
/* $Id: utils.c,v 1.41 2001/02/10 22:51:08 dwelch Exp $ /* $Id: utils.c,v 1.42 2001/03/26 16:33:10 dwelch Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -516,18 +516,18 @@ LdrFixupForward(PCHAR ForwardName)
0, 0,
&DllName, &DllName,
&BaseAddress); &BaseAddress);
RtlFreeUnicodeString (&DllName);
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
DbgPrint("LdrFixupForward: failed to load %wZ\n", &DllName); DbgPrint("LdrFixupForward: failed to load %wZ\n", &DllName);
RtlFreeUnicodeString (&DllName);
return NULL; return NULL;
} }
} }
RtlFreeUnicodeString (&DllName); RtlFreeUnicodeString (&DllName);
DPRINT("BaseAddress: %p\n", BaseAddress); DPRINT("BaseAddress: %p\n", BaseAddress);
return LdrGetExportByName(BaseAddress, p+1, -1); return LdrGetExportByName(BaseAddress, p+1, -1);
} }
return NULL; return NULL;

View file

@ -284,16 +284,28 @@ entry:
mov [_multiboot_mem_lower],ebx mov [_multiboot_mem_lower],ebx
mov ax, 0xe801 mov ax, 0xe801
int 015h int 015h
cmp ebx,ebx jc .oldstylemem
jz .oldstylemem cmp ax, 0
je .cmem
and ebx, 0xffff and ebx, 0xffff
shl ebx,6 shl ebx,6
mov [_multiboot_mem_upper],ebx mov [_multiboot_mem_upper],ebx
and eax,0xffff and eax,0xffff
add dword [_multiboot_mem_upper],eax add dword [_multiboot_mem_upper],eax
jmp .done_mem jmp .done_mem
.cmem
cmp cx, 0
je .oldstylemem
add edx, 0xFFFF
shl edx, 6
mov [_multiboot_mem_upper], edx
and ecx, 0xFFFF
add dword [_multiboot_mem_upper], ecx
jmp .done_mem
.oldstylemem: .oldstylemem:
;; int 15h opt e801 don't work , try int 15h, option 88h ;; int 15h opt e801 don't work , try int 15h, option 88h
mov ah, 088h mov ah, 088h