Changeset 95851 in vbox
- Timestamp:
- Jul 26, 2022 11:38:31 PM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 152576
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxService/VBoxServicePageSharing.cpp
r93115 r95851 167 167 * always use the wide version of the API and convert to UTF-8/whatever. */ 168 168 169 sprintf(szFileVersionLocation, TEXT("\\StringFileInfo\\%04x%04x\\FileVersion"), lpTranslate[i].wLanguage, lpTranslate[i].wCodePage); 169 RTStrPrintf(szFileVersionLocation, sizeof(szFileVersionLocation), 170 "\\StringFileInfo\\%04x%04x\\FileVersion", lpTranslate[i].wLanguage, lpTranslate[i].wCodePage); 170 171 fRet = VerQueryValue(pVersionInfo, szFileVersionLocation, (LPVOID *)&pszFileVersion, &cbFileVersion); 171 172 if (fRet) … … 444 445 break; 445 446 446 /** @todo FullPathName not an UTF-8 string is! An ANSI string it is. */ 447 /** @todo FullPathName not an UTF-8 string is! An ANSI string it is 448 * according to the SYSTEM locale. Best use RtlAnsiStringToUnicodeString to 449 * convert to UTF-16. */ 447 450 strcpy(pModule->Info.szModule, 448 451 (const char *)&pSystemModules->Modules[i].FullPathName[pSystemModules->Modules[i].OffsetToFileName]); … … 454 457 { 455 458 /* Seen just file names in XP; try to locate the file in the system32 and system32\drivers directories. */ 456 strcat(szFullFilePath, "\\");457 strcat(szFullFilePath, (const char *)pSystemModules->Modules[i].FullPathName);459 RTStrCat(szFullFilePath, sizeof(szFullFilePath), "\\"); 460 RTStrCat(szFullFilePath, sizeof(szFullFilePath), (const char *)pSystemModules->Modules[i].FullPathName); 458 461 VGSvcVerbose(3, "Unexpected kernel module name try %s\n", szFullFilePath); 459 462 if (RTFileExists(szFullFilePath) == false) 460 463 { 461 464 GetSystemDirectoryA(szFullFilePath, sizeof(szFullFilePath)); 462 strcat(szFullFilePath, "\\drivers\\");463 strcat(szFullFilePath, (const char *)pSystemModules->Modules[i].FullPathName);465 RTStrCat(szFullFilePath, sizeof(szFullFilePath), "\\drivers\\"); 466 RTStrCat(szFullFilePath, sizeof(szFullFilePath), (const char *)pSystemModules->Modules[i].FullPathName); 464 467 VGSvcVerbose(3, "Unexpected kernel module name try %s\n", szFullFilePath); 465 468 if (RTFileExists(szFullFilePath) == false) … … 481 484 } 482 485 483 strcat(szFullFilePath, lpPath);486 RTStrCat(szFullFilePath, sizeof(szFullFilePath), lpPath); 484 487 } 485 488
Note:
See TracChangeset
for help on using the changeset viewer.