Changeset 35709 in vbox for trunk/src/VBox/Additions
- Timestamp:
- Jan 25, 2011 1:03:11 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Installer/VBoxDrvInst.cpp
r35705 r35709 98 98 if (::FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, dwLastError, 0, pszMsg, dwBufSize / sizeof(TCHAR), NULL) == 0) 99 99 { 100 _s tprintf(pszMsg, _T("Unknown error!\n"), dwLastError);100 _sntprintf(pszMsg, dwBufSize / sizeof(TCHAR), _T("Unknown error!\n"), dwLastError); 101 101 return false; 102 102 } … … 104 104 { 105 105 _TCHAR *p = _tcschr(pszMsg, _T('\r')); 106 107 106 if (p != NULL) 108 107 *p = _T('\0'); … … 1048 1047 else 1049 1048 { 1050 _s tprintf(szINF, _T("%ws"), argv[3]);1049 _sntprintf(szINF, sizeof(szINF) / sizeof(TCHAR), _T("%ws"), argv[3]); 1051 1050 1052 1051 _TCHAR szLogFile[_MAX_PATH] = { 0 }; 1053 1052 if (argc > 4) 1054 _s tprintf(szLogFile, _T("%ws"), argv[4]);1053 _sntprintf(szLogFile, sizeof(szLogFile) / sizeof(TCHAR), _T("%ws"), argv[4]); 1055 1054 rc = VBoxInstallDriver(!_tcsicmp(argv[2], _T("install")) ? TRUE : FALSE, szINF, 1056 1055 FALSE /* Not silent */, szLogFile[0] != NULL ? szLogFile : NULL); … … 1060 1059 && argc == 4) 1061 1060 { 1062 _s tprintf(szINF, _T("%ws"), argv[3]);1061 _sntprintf(szINF, sizeof(szINF) / sizeof(TCHAR), _T("%ws"), argv[3]); 1063 1062 rc = ExecuteInfFile(_T("DefaultInstall"), 132, szINF); 1064 1063 } … … 1074 1073 if (argc > 4) 1075 1074 iOrder = _ttoi(argv[4]); 1076 _s tprintf(szProvider, _T("%ws"), argv[3]);1075 _sntprintf(szProvider, sizeof(szProvider) / sizeof(TCHAR), _T("%ws"), argv[3]); 1077 1076 rc = AddNetworkProvider(szProvider, iOrder); 1078 1077 } … … 1080 1079 && argc >= 4) 1081 1080 { 1082 _s tprintf(szProvider, _T("%ws"), argv[3]);1081 _sntprintf(szProvider, sizeof(szProvider) / sizeof(TCHAR), _T("%ws"), argv[3]); 1083 1082 rc = RemoveNetworkProvider(szProvider); 1084 1083 }
Note:
See TracChangeset
for help on using the changeset viewer.