https://git.reactos.org/?p=reactos.git;a=commitdiff;h=fd8080b0942e88502ca1735a0590f31e6d072e32

commit fd8080b0942e88502ca1735a0590f31e6d072e32
Author:     Colin Finck <co...@reactos.org>
AuthorDate: Sat Feb 20 17:13:38 2021 +0100
Commit:     Colin Finck <co...@reactos.org>
CommitDate: Sat Feb 20 17:13:38 2021 +0100

    [KERNEL32] Align the PROCESS_PRIORITY_CLASS variable in GetPriorityClass on 
a 4-byte boundary.
    
    Fixes CORE-16757.
    This is required for NtQueryInformationProcess as proven by my test 
application in the bug report.
---
 dll/win32/kernel32/client/proc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dll/win32/kernel32/client/proc.c b/dll/win32/kernel32/client/proc.c
index e107c19b029..3b7d6f05ec5 100644
--- a/dll/win32/kernel32/client/proc.c
+++ b/dll/win32/kernel32/client/proc.c
@@ -1658,7 +1658,7 @@ WINAPI
 GetPriorityClass(IN HANDLE hProcess)
 {
     NTSTATUS Status;
-    PROCESS_PRIORITY_CLASS PriorityClass;
+    PROCESS_PRIORITY_CLASS DECLSPEC_ALIGN(4) PriorityClass;
 
     /* Query the kernel */
     Status = NtQueryInformationProcess(hProcess,

Reply via email to