From: Gerald Pfeifer Subject: ntdll: Avoid two cases of shift overflow in get_cpuinfo. Message-Id: Date: Fri, 11 Sep 2015 21:28:29 +0200 (CEST) --- dlls/ntdll/nt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c index 2acaa83..8ae3a98 100644 --- a/dlls/ntdll/nt.c +++ b/dlls/ntdll/nt.c @@ -1001,8 +1001,8 @@ static inline void get_cpuinfo(SYSTEM_CPU_INFORMATION* info) do_cpuid(0x80000001, regs2); /* get vendor features */ user_shared_data->ProcessorFeatures[PF_VIRT_FIRMWARE_ENABLED] = (regs2[2] & (1 << 2 )) >> 2; user_shared_data->ProcessorFeatures[PF_NX_ENABLED] = (regs2[3] & (1 << 20 )) >> 20; - user_shared_data->ProcessorFeatures[PF_3DNOW_INSTRUCTIONS_AVAILABLE] = (regs2[3] & (1 << 31 )) >> 31; - if(regs2[3] & (1 << 31)) info->FeatureSet |= CPU_FEATURE_3DNOW; + user_shared_data->ProcessorFeatures[PF_3DNOW_INSTRUCTIONS_AVAILABLE] = (regs2[3] & (1u << 31 )) >> 31; + if(regs2[3] & (1u << 31)) info->FeatureSet |= CPU_FEATURE_3DNOW; } } else if (regs[1] == GENU && regs[3] == INEI && regs[2] == NTEL) -- 2.5.1