mirror of
https://github.com/reactos/reactos.git
synced 2024-07-12 23:55:07 +00:00
fixed a bug in LdrAccessResource(), it should abort when ResourceDataEntry == NULL
svn path=/trunk/; revision=5768
This commit is contained in:
parent
130e0947f7
commit
aefd11c055
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: res.c,v 1.4 2003/07/11 13:50:23 royce Exp $
|
/* $Id: res.c,v 1.5 2003/08/22 20:00:39 weiden Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -167,6 +167,9 @@ LdrAccessResource(IN PVOID BaseAddress,
|
||||||
ULONG Offset = 0;
|
ULONG Offset = 0;
|
||||||
ULONG Data;
|
ULONG Data;
|
||||||
|
|
||||||
|
if(!ResourceDataEntry)
|
||||||
|
return STATUS_RESOURCE_DATA_NOT_FOUND;
|
||||||
|
|
||||||
Data = (ULONG)RtlImageDirectoryEntryToData(BaseAddress,
|
Data = (ULONG)RtlImageDirectoryEntryToData(BaseAddress,
|
||||||
TRUE, IMAGE_DIRECTORY_ENTRY_RESOURCE, &DataSize);
|
TRUE, IMAGE_DIRECTORY_ENTRY_RESOURCE, &DataSize);
|
||||||
if (Data == 0) {
|
if (Data == 0) {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: resource.c,v 1.5 2003/07/10 20:34:50 royce Exp $
|
/* $Id: resource.c,v 1.6 2003/08/22 20:00:39 weiden Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -33,6 +33,9 @@ LdrAccessResource(IN PVOID BaseAddress,
|
||||||
ULONG Offset = 0;
|
ULONG Offset = 0;
|
||||||
ULONG Data;
|
ULONG Data;
|
||||||
|
|
||||||
|
if(!ResourceDataEntry)
|
||||||
|
return STATUS_RESOURCE_DATA_NOT_FOUND;
|
||||||
|
|
||||||
Data = (ULONG)RtlImageDirectoryEntryToData (BaseAddress,
|
Data = (ULONG)RtlImageDirectoryEntryToData (BaseAddress,
|
||||||
TRUE,
|
TRUE,
|
||||||
IMAGE_DIRECTORY_ENTRY_RESOURCE,
|
IMAGE_DIRECTORY_ENTRY_RESOURCE,
|
||||||
|
|
Loading…
Reference in a new issue