From a7f124ae31698248ef76af57af32822baffebd90 Mon Sep 17 00:00:00 2001 From: Gerald Pfeifer Date: Mon, 26 Oct 2015 23:00:14 +0100 Subject: [PATCH] ntdll: Avoid a case of shift overflow in get_cpuinfo. Signed-off-by: Gerald Pfeifer Signed-off-by: Alexandre Julliard --- dlls/ntdll/nt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c index 0bcc8b01776..d2ed9c5aa45 100644 --- a/dlls/ntdll/nt.c +++ b/dlls/ntdll/nt.c @@ -1002,7 +1002,7 @@ static inline void get_cpuinfo(SYSTEM_CPU_INFORMATION* info) user_shared_data->ProcessorFeatures[PF_VIRT_FIRMWARE_ENABLED] = (regs2[2] >> 2) & 1; user_shared_data->ProcessorFeatures[PF_NX_ENABLED] = (regs2[3] >> 20) & 1; user_shared_data->ProcessorFeatures[PF_3DNOW_INSTRUCTIONS_AVAILABLE] = (regs2[3] >> 31) & 1; - if(regs2[3] & (1 << 31)) info->FeatureSet |= CPU_FEATURE_3DNOW; + if (regs2[3] >> 31) info->FeatureSet |= CPU_FEATURE_3DNOW; } } else if (regs[1] == GENU && regs[3] == INEI && regs[2] == NTEL) -- 2.11.4.GIT