[PATCH] ntdll: Fix size comparison in NtQuerySystemInformation(SystemCodeIntegrityInformation).

Paul Gofman pgofman at codeweavers.com
Wed Oct 20 12:54:22 CDT 2021


Signed-off-by: Paul Gofman <pgofman at codeweavers.com>
---
 dlls/ntdll/unix/system.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/ntdll/unix/system.c b/dlls/ntdll/unix/system.c
index 82c9f0da492..9d518719942 100644
--- a/dlls/ntdll/unix/system.c
+++ b/dlls/ntdll/unix/system.c
@@ -3061,7 +3061,7 @@ NTSTATUS WINAPI NtQuerySystemInformation( SYSTEM_INFORMATION_CLASS class,
 
         len = sizeof(SYSTEM_CODEINTEGRITY_INFORMATION);
 
-        if (size < len)
+        if (size >= len)
             integrity_info->CodeIntegrityOptions = CODEINTEGRITY_OPTION_ENABLED;
         else
             ret = STATUS_INFO_LENGTH_MISMATCH;
-- 
2.31.1




More information about the wine-devel mailing list