diff --git a/Helpers.cpp b/Helpers.cpp index ae45c4d..a2c3d26 100644 --- a/Helpers.cpp +++ b/Helpers.cpp @@ -185,7 +185,7 @@ std::wstring GenerateInheritanceFlags(DWORD iCurrentFlags) std::wstring GenerateAccessMask(DWORD iCurrentMask) { // define the aesthetic names of permission - static struct + static struct MaskDefinitionsType { const DWORD Mask; const std::wstring Description; @@ -471,7 +471,7 @@ std::wstring FileSizeToString(const LARGE_INTEGER iFileSize) // convert the file size to a string WCHAR sSize[32]; _wsetlocale(LC_NUMERIC, L""); - wsprintf(sSize, L"%I64u", iFileSize.QuadPart); + wsprintf(sSize, L"%I64u", (ULONGLONG) iFileSize.QuadPart); return std::wstring(sSize); } diff --git a/OperationLocate.cpp b/OperationLocate.cpp index 21db047..b8c182c 100644 --- a/OperationLocate.cpp +++ b/OperationLocate.cpp @@ -13,14 +13,14 @@ OperationLocate::OperationLocate(std::queue & oArgList, const std: std::vector sMatchAndArgs = ProcessAndCheckArgs(1, oArgList, L"\\0"); // fetch params - HANDLE hFile = CreateFile(sReportFile[0].c_str(), GENERIC_WRITE, + HANDLE hFile = CreateFile(sReportFile.at(0).c_str(), GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, nullptr); // see if names could be resolved if (hFile == INVALID_HANDLE_VALUE) { // complain - wprintf(L"ERROR: Could not create file '%s' specified for parameter '%s'.\n", sReportFile[0].c_str(), GetCommand().c_str()); + wprintf(L"ERROR: Could not create file '%s' specified for parameter '%s'.\n", sReportFile.at(0).c_str(), GetCommand().c_str()); exit(-1); } diff --git a/OperationLocateShortcut.cpp b/OperationLocateShortcut.cpp index cec6bd2..e881844 100644 --- a/OperationLocateShortcut.cpp +++ b/OperationLocateShortcut.cpp @@ -66,7 +66,7 @@ OperationLocateShortcut::OperationLocateShortcut(std::queue & oArg } catch (const std::regex_error &) { - wprintf(L"ERROR: Invalid regular expression '%s' specified for parameter '%s'.\n", sMatchAndArgs[0].c_str(), GetCommand().c_str()); + wprintf(L"ERROR: Invalid regular expression '%s' specified for parameter '%s'.\n", sMatchAndArgs.at(0).c_str(), GetCommand().c_str()); exit(-1); } } diff --git a/OperationPathList.cpp b/OperationPathList.cpp index 2471fc4..46bb4f6 100644 --- a/OperationPathList.cpp +++ b/OperationPathList.cpp @@ -35,7 +35,7 @@ OperationPathList::OperationPathList(std::queue & oArgList, const } // store off the argument - InputOutput::ScanPaths().push_back(oLineItems[0]); + InputOutput::ScanPaths().push_back(oLineItems.at(0)); } // cleanup diff --git a/OperationReport.cpp b/OperationReport.cpp index f352b1a..8dbe654 100644 --- a/OperationReport.cpp +++ b/OperationReport.cpp @@ -67,7 +67,7 @@ OperationReport::OperationReport(std::queue & oArgList, const std: AppliesToOwner = true; // target certain parts of the security descriptor - if (sMatchAndArgs.size() > 1) ProcessGranularTargetting(sMatchAndArgs[1]); + if (sMatchAndArgs.size() > 1) ProcessGranularTargetting(sMatchAndArgs.at(1)); } SidActionResult OperationReport::DetermineSid(WCHAR * const sSdPart, ObjectEntry & tObjectEntry, PSID const tCurrentSid, PSID & tResultantSid)