Changeset 3584 in kBuild for trunk/src/lib
- Timestamp:
- Jan 20, 2023 3:29:36 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/nt/nt_child_inject_standard_handles.c
r3236 r3584 172 172 } Wow64; 173 173 } BasicInfo = { { 0, 0, } }; 174 uintptr_t uBasicInfoPeb;174 ULONGLONG ullBasicInfoPeb; 175 175 NTSTATUS rcNt; 176 176 ULONGLONG ullPeb32 = 0; … … 244 244 */ 245 245 #if K_ARCH_BITS != 64 246 /** @todo On vista PEB can be above 4GB! */247 246 if (s_fHostIs64Bit && pfnNtWow64QueryInformationProcess64) 248 247 { … … 254 253 return rcNt; 255 254 } 256 if ( BasicInfo.Wow64.PebBaseAddress < 0x1000 257 || BasicInfo.Wow64.PebBaseAddress > ~(uintptr_t)0x1000) 255 if ((ULONGLONG)BasicInfo.Wow64.PebBaseAddress < 0x1000) 258 256 { 259 257 _snprintf(pszErr, cbErr, "NtWow64QueryInformationProcess64 returned bad PebBaseAddress: %#llx", … … 261 259 return ERROR_INVALID_ADDRESS; 262 260 } 263 u BasicInfoPeb = (uintptr_t)BasicInfo.Wow64.PebBaseAddress;261 ullBasicInfoPeb = BasicInfo.Wow64.PebBaseAddress; 264 262 } 265 263 else … … 276 274 { 277 275 _snprintf(pszErr, cbErr, "NtQueryInformationProcess returned bad PebBaseAddress: %#llx", 278 BasicInfo.Natural.PebBaseAddress);276 (ULONGLONG)BasicInfo.Natural.PebBaseAddress); 279 277 return ERROR_INVALID_ADDRESS; 280 278 } 281 u BasicInfoPeb = (uintptr_t)BasicInfo.Natural.PebBaseAddress;279 ullBasicInfoPeb = (uintptr_t)BasicInfo.Natural.PebBaseAddress; 282 280 } 283 281 … … 289 287 #if K_ARCH_BITS != 64 290 288 if (!s_fHostIs64Bit) 291 ullPeb32 = u BasicInfoPeb;289 ullPeb32 = ullBasicInfoPeb; 292 290 else 293 291 #endif … … 299 297 { 300 298 ullPeb32 = uPeb32Ptr; 301 ullPeb64 = u BasicInfoPeb;299 ullPeb64 = ullBasicInfoPeb; 302 300 #if K_ARCH_BITS != 64 303 301 assert(ullPeb64 != ullPeb32); … … 309 307 { 310 308 assert(NT_SUCCESS(rcNt)); 311 ullPeb64 = u BasicInfoPeb;309 ullPeb64 = ullBasicInfoPeb; 312 310 } 313 311 }
Note:
See TracChangeset
for help on using the changeset viewer.