Added patch to fix test failure in kernel32/thread tests.

This commit is contained in:
Sebastian Lackner
2015-08-22 06:11:04 +02:00
parent cbf392300d
commit c8eb156226
2 changed files with 43 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
From 150188795c58473879e1047352e28ac3c8f69799 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 22 Aug 2015 06:07:26 +0200
Subject: kernel32/tests: Properly initialize buf before calling
NtQueryInformationThread.
---
dlls/kernel32/tests/thread.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/kernel32/tests/thread.c b/dlls/kernel32/tests/thread.c
index 0d1f4a6..561dd53 100644
--- a/dlls/kernel32/tests/thread.c
+++ b/dlls/kernel32/tests/thread.c
@@ -1742,7 +1742,8 @@ static void test_thread_info(void)
size = info_size[i];
if (!size) size = sizeof(buf);
ret_len = 0;
- status = pNtQueryInformationThread(thread, i, buf, info_size[i], &ret_len);
+ memset(buf, 0, size);
+ status = pNtQueryInformationThread(thread, i, buf, size, &ret_len);
if (status == STATUS_NOT_IMPLEMENTED) continue;
if (status == STATUS_INVALID_INFO_CLASS) continue;
if (status == STATUS_UNSUCCESSFUL) continue;
--
2.5.0