Author: tfaber
Date: Sun Jun 22 18:44:21 2014
New Revision: 63630
URL:
http://svn.reactos.org/svn/reactos?rev=63630&view=rev
Log:
[RTL]
- Apply Wine commit 5b0fcb06 (ntdll: Avoid crashing on an empty resource directory.) by
Alexandre Julliard
Modified:
trunk/reactos/dll/ntdll/rtl/libsupp.c
trunk/reactos/ntoskrnl/rtl/libsupp.c
Modified: trunk/reactos/dll/ntdll/rtl/libsupp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/rtl/libsupp.c?re…
==============================================================================
--- trunk/reactos/dll/ntdll/rtl/libsupp.c [iso-8859-1] (original)
+++ trunk/reactos/dll/ntdll/rtl/libsupp.c [iso-8859-1] Sun Jun 22 18:44:21 2014
@@ -430,6 +430,7 @@
root = RtlImageDirectoryEntryToData( BaseAddress, TRUE,
IMAGE_DIRECTORY_ENTRY_RESOURCE, &size );
if (!root) return STATUS_RESOURCE_DATA_NOT_FOUND;
+ if (size < sizeof(*resdirptr)) return STATUS_RESOURCE_DATA_NOT_FOUND;
resdirptr = root;
if (!level--) goto done;
Modified: trunk/reactos/ntoskrnl/rtl/libsupp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/rtl/libsupp.c?rev…
==============================================================================
--- trunk/reactos/ntoskrnl/rtl/libsupp.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/rtl/libsupp.c [iso-8859-1] Sun Jun 22 18:44:21 2014
@@ -695,6 +695,7 @@
root = RtlImageDirectoryEntryToData( BaseAddress, TRUE,
IMAGE_DIRECTORY_ENTRY_RESOURCE, &size );
if (!root) return STATUS_RESOURCE_DATA_NOT_FOUND;
+ if (size < sizeof(*resdirptr)) return STATUS_RESOURCE_DATA_NOT_FOUND;
resdirptr = root;
if (!level--) goto done;