Changeset 30036 in vbox
- Timestamp:
- Jun 4, 2010 1:27:42 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxService/VBoxServicePageSharing.cpp
r30035 r30036 25 25 #include <iprt/mem.h> 26 26 #include <iprt/stream.h> 27 #include <iprt/file.h> 27 28 #include <iprt/string.h> 28 29 #include <iprt/semaphore.h> … … 404 405 continue; 405 406 406 char *pszDot = strrchr(pSystemModules->Modules[i].FullPathName, '.');407 if ( pszDot408 && (pszDot[1] == 'e' || pszDot[1] == 'E')409 && strcmp(&pSystemModules->Modules[i].FullPathName[pSystemModules->Modules[i].OffsetToFileName], "ntoskrnl.exe"))410 continue; /* ignore executables for now. */411 412 407 /* Found it before? */ 413 408 PAVLPVNODECORE pRec = RTAvlPVGet(&pNewTree, pSystemModules->Modules[i].ImageBase); … … 432 427 { 433 428 VBoxServiceVerbose(1, "Unexpected kernel module name %s\n", pSystemModules->Modules[i].FullPathName); 434 RTMemFree(pModule); 435 continue; 429 430 /* Seen just file names in XP; try to locate the file in the system32 and system32\drivers directories. */ 431 strcat(szFullFilePath, "\\"); 432 strcat(szFullFilePath, pSystemModules->Modules[i].FullPathName); 433 VBoxServiceVerbose(3, "Unexpected kernel module name try %s\n", szFullFilePath); 434 if (RTFileExists(szFullFilePath) == false) 435 { 436 GetSystemDirectoryA(szFullFilePath, sizeof(szFullFilePath)); 437 strcat(szFullFilePath, "\\drivers\\"); 438 strcat(szFullFilePath, pSystemModules->Modules[i].FullPathName); 439 VBoxServiceVerbose(3, "Unexpected kernel module name try %s\n", szFullFilePath); 440 if (RTFileExists(szFullFilePath) == false) 441 { 442 VBoxServiceVerbose(1, "Unexpected kernel module name %s\n", pSystemModules->Modules[i].FullPathName); 443 RTMemFree(pModule); 444 continue; 445 } 446 } 436 447 } 437 438 lpPath = strchr(lpPath+1, '\\'); 439 if (!lpPath) 448 else 440 449 { 441 VBoxServiceVerbose(1, "Unexpected kernel module name %s (2)\n", pSystemModules->Modules[i].FullPathName); 442 RTMemFree(pModule); 443 continue; 450 lpPath = strchr(lpPath+1, '\\'); 451 if (!lpPath) 452 { 453 VBoxServiceVerbose(1, "Unexpected kernel module name %s (2)\n", pSystemModules->Modules[i].FullPathName); 454 RTMemFree(pModule); 455 continue; 456 } 457 458 strcat(szFullFilePath, lpPath); 444 459 } 445 460 446 strcat(szFullFilePath, lpPath);447 461 strcpy(pModule->Info.szExePath, szFullFilePath); 448 462 pModule->Info.modBaseAddr = (BYTE *)pSystemModules->Modules[i].ImageBase;
Note:
See TracChangeset
for help on using the changeset viewer.

