Changeset 11889 in vbox for trunk/src/VBox/VMM/PDMLdr.cpp
- Timestamp:
- Aug 31, 2008 6:08:32 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 35741
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PDMLdr.cpp
r9148 r11889 271 271 * Allocate the module list node and initialize it. 272 272 */ 273 PPDMMOD pModule = (PPDMMOD)RTMemAllocZ(sizeof(*pModule) + cchFilename); 273 const char *pszSuff = RTLdrGetSuff(); 274 size_t cchSuff = strlen(pszSuff); 275 PPDMMOD pModule = (PPDMMOD)RTMemAllocZ(sizeof(*pModule) + cchFilename + cchSuff); 274 276 if (!pModule) 275 277 return VERR_NO_MEMORY; … … 278 280 memcpy(pModule->szName, pszName, cchName); /* memory is zero'ed, no need to copy terminator :-) */ 279 281 memcpy(pModule->szFilename, pszFilename, cchFilename); 282 memcpy(&pModule->szFilename[cchFilename], pszSuff, cchSuff); 280 283 281 284 /* 282 285 * Load the loader item. 283 286 */ 284 int rc = RTLdrLoad(pszFilename, &pModule->hLdrMod); 287 int rc = SUPR3HardenedVerifyFile(pModule->szFilename, "pdmR3LoadR3U", NULL); 288 if (RT_SUCCESS(rc)) 289 rc = RTLdrLoad(pModule->szFilename, &pModule->hLdrMod); 285 290 if (VBOX_SUCCESS(rc)) 286 291 { … … 448 453 * Open the loader item. 449 454 */ 450 int rc = RTLdrOpen(pszFilename, &pModule->hLdrMod); 455 int rc = SUPR3HardenedVerifyFile(pszFilename, "PDMR3LoadGC", NULL); 456 if (RT_SUCCESS(rc)) 457 rc = RTLdrOpen(pszFilename, &pModule->hLdrMod); 451 458 if (VBOX_SUCCESS(rc)) 452 459 {
Note:
See TracChangeset
for help on using the changeset viewer.