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

View File

@ -137,6 +137,7 @@ patch_enable_all ()
enable_iphlpapi_TCP_Table="$1"
enable_kernel32_CompareStringEx="$1"
enable_kernel32_CopyFileEx="$1"
enable_kernel32_Fix_Testfailure="$1"
enable_kernel32_GetFinalPathNameByHandle="$1"
enable_kernel32_GetLogicalProcessorInformationEx="$1"
enable_kernel32_LocaleNameToLCID="$1"
@ -498,6 +499,9 @@ patch_enable ()
kernel32-CopyFileEx)
enable_kernel32_CopyFileEx="$2"
;;
kernel32-Fix_Testfailure)
enable_kernel32_Fix_Testfailure="$2"
;;
kernel32-GetFinalPathNameByHandle)
enable_kernel32_GetFinalPathNameByHandle="$2"
;;
@ -3179,6 +3183,18 @@ if test "$enable_kernel32_CopyFileEx" -eq 1; then
) >> "$patchlist"
fi
# Patchset kernel32-Fix_Testfailure
# |
# | Modified files:
# | * dlls/kernel32/tests/thread.c
# |
if test "$enable_kernel32_Fix_Testfailure" -eq 1; then
patch_apply kernel32-Fix_Testfailure/0001-kernel32-tests-Properly-initialize-buf-before-callin.patch
(
echo '+ { "Sebastian Lackner", "kernel32/tests: Properly initialize buf before calling NtQueryInformationThread.", 1 },';
) >> "$patchlist"
fi
# Patchset kernel32-GetFinalPathNameByHandle
# |
# | This patchset fixes the following Wine bugs: