Changeset 70313 in vbox for trunk/src/VBox
- Timestamp:
- Dec 22, 2017 12:15:47 PM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 119910
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/ldr/ldrPE.cpp
r70312 r70313 1238 1238 * Get address. 1239 1239 */ 1240 uint ptr_tuRVAExport = paAddress[uOrdinal];1240 uint32_t uRVAExport = paAddress[uOrdinal]; 1241 1241 RTUINTPTR Value; 1242 if ( uRVAExport - (uintptr_t)pThis->ExportDir.VirtualAddress 1243 < pThis->ExportDir.Size) 1244 { 1245 if (!(fFlags & RTLDR_ENUM_SYMBOL_FLAGS_NO_FWD)) 1246 { 1247 /* Resolve forwarder. */ 1248 AssertMsgFailed(("Forwarders are not supported!\n")); 1249 } 1242 if (uRVAExport - pThis->ExportDir.VirtualAddress >= pThis->ExportDir.Size) 1243 Value = PE_RVA2TYPE(BaseAddress, uRVAExport, RTUINTPTR); 1244 else if (!(fFlags & RTLDR_ENUM_SYMBOL_FLAGS_NO_FWD)) 1245 Value = RTLDR_ENUM_SYMBOL_FWD_ADDRESS; 1246 else 1250 1247 continue; 1251 }1252 1253 /* Get plain export address */1254 Value = PE_RVA2TYPE(BaseAddress, uRVAExport, RTUINTPTR);1255 1248 1256 1249 /* Read in the name if found one. */ … … 1336 1329 uint32_t *paRVANames = PE_RVA2TYPE(pvBits, pExpDir->AddressOfNames, uint32_t *); 1337 1330 uint16_t *paOrdinals = PE_RVA2TYPE(pvBits, pExpDir->AddressOfNameOrdinals, uint16_t *); 1338 uint32_t uNamePrev = 0;1339 unsigned cOrdinals = RT_MAX(pExpDir->NumberOfNames, pExpDir->NumberOfFunctions);1331 uint32_t uNamePrev = 0; 1332 unsigned cOrdinals = RT_MAX(pExpDir->NumberOfNames, pExpDir->NumberOfFunctions); 1340 1333 for (unsigned uOrdinal = 0; uOrdinal < cOrdinals; uOrdinal++) 1341 1334 { … … 1376 1369 * Get address. 1377 1370 */ 1378 uint ptr_tuRVAExport = paAddress[uOrdinal];1371 uint32_t uRVAExport = paAddress[uOrdinal]; 1379 1372 RTUINTPTR Value; 1380 if ( uRVAExport - (uintptr_t)pModPe->ExportDir.VirtualAddress 1381 < pModPe->ExportDir.Size) 1382 { 1383 if (!(fFlags & RTLDR_ENUM_SYMBOL_FLAGS_NO_FWD)) 1384 { 1385 /* Resolve forwarder. */ 1386 AssertMsgFailed(("Forwarders are not supported!\n")); 1387 } 1373 if (uRVAExport - pModPe->ExportDir.VirtualAddress >= pModPe->ExportDir.Size) 1374 Value = PE_RVA2TYPE(BaseAddress, uRVAExport, RTUINTPTR); 1375 else if (!(fFlags & RTLDR_ENUM_SYMBOL_FLAGS_NO_FWD)) 1376 Value = RTLDR_ENUM_SYMBOL_FWD_ADDRESS; 1377 else 1388 1378 continue; 1389 }1390 1391 /* Get plain export address */1392 Value = PE_RVA2TYPE(BaseAddress, uRVAExport, RTUINTPTR);1393 1379 1394 1380 /*
Note:
See TracChangeset
for help on using the changeset viewer.