https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9b421af118427bad62122…
commit 9b421af118427bad62122ed7c16e72e59d6c04d2
Author: Mark Jansen <mark.jansen(a)reactos.org>
AuthorDate: Wed Oct 28 20:14:34 2020 +0100
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Thu Oct 29 20:17:58 2020 +0100
[NTDLL_APITEST] Fix LdrEnumResources testdata initialization
ROSTESTS-361
---
modules/rostests/apitests/ntdll/LdrEnumResources.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/modules/rostests/apitests/ntdll/LdrEnumResources.c
b/modules/rostests/apitests/ntdll/LdrEnumResources.c
index 7dfd08b5991..e20cfd2bef5 100644
--- a/modules/rostests/apitests/ntdll/LdrEnumResources.c
+++ b/modules/rostests/apitests/ntdll/LdrEnumResources.c
@@ -172,6 +172,7 @@ InitializeTestImage(
TestImage->NtHeaders.OptionalHeader.ImageBase = (DWORD_PTR)TestImage;
TestImage->NtHeaders.OptionalHeader.SizeOfImage = sizeof(TEST_IMAGE);
TestImage->NtHeaders.OptionalHeader.SizeOfHeaders = sizeof(IMAGE_DOS_HEADER) +
sizeof(IMAGE_NT_HEADERS);
+ TestImage->NtHeaders.OptionalHeader.NumberOfRvaAndSizes =
ARRAYSIZE(TestImage->NtHeaders.OptionalHeader.DataDirectory);
ResourceDirectory =
&TestImage->NtHeaders.OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_RESOURCE];
ResourceDirectory->VirtualAddress = FIELD_OFFSET(TEST_IMAGE, Resources);
@@ -359,6 +360,7 @@ Test_Parameters(PTEST_IMAGE TestImage)
START_TEST(LdrEnumResources)
{
TEST_IMAGE TestImage;
+ RtlZeroMemory(&TestImage, sizeof(TestImage));
Test_Parameters(&TestImage);
Test_Data(&TestImage);