diff --git a/Build/Release/x64/repacls.exe b/Build/Release/x64/repacls.exe index 9fd15bf..e1322c4 100644 Binary files a/Build/Release/x64/repacls.exe and b/Build/Release/x64/repacls.exe differ diff --git a/Build/Release/x86/repacls.exe b/Build/Release/x86/repacls.exe index c1714bc..cdd88ca 100644 Binary files a/Build/Release/x86/repacls.exe and b/Build/Release/x86/repacls.exe differ diff --git a/Build/Repacls.zip b/Build/Repacls.zip index ded8354..74bd57d 100644 Binary files a/Build/Repacls.zip and b/Build/Repacls.zip differ diff --git a/OperationDomainPaths.cpp b/OperationDomainPaths.cpp index 86aa7ee..5dffefc 100644 --- a/OperationDomainPaths.cpp +++ b/OperationDomainPaths.cpp @@ -132,12 +132,12 @@ OperationDomainPaths::OperationDomainPaths(std::queue& oArgList, c bool bMatchSite = false; if (DsAddressToSiteNames(sDomainController.c_str(), 1, tAddressArray, &sSiteName) == NO_ERROR) { - bMatchSite = std::regex_match(std::wstring(sSiteName[0]), std::wregex(sSiteArgs.at(0))); + if (sSiteName[0] != NULL) bMatchSite = std::regex_match(std::wstring(sSiteName[0]), std::wregex(sSiteArgs.at(0))); NetApiBufferFree(sSiteName); } // cleanup - if (sSiteName != NULL) FreeAddrInfo(pAddressInfo); + FreeAddrInfo(pAddressInfo); // skip this name is not match if (!bMatchSite) continue; diff --git a/Resource.rc b/Resource.rc index 4cb1261..4d9198b 100644 Binary files a/Resource.rc and b/Resource.rc differ