I can also see that this read in correctly and used in the call to CStringUtils::Decrypt() so I can only assume that something has changed which caused the encrypted data to become invalid. Granted, this is invalid data, but it shouldn't cause a crash.
--- C:/Users/daniel/AppData/Local/Temp/LogDlg.cpp-revBASE.svn001.tmp.cpp
fre sep 15 19:59:11 2023
+++ C:/devel/tsvn_trunk/src/TortoiseProc/LogDialog/LogDlg.cpp
tor mar 6 13:55:49 2025
@@ -8723,8 +8723,10 @@ void CLogDlg::MonitorEditProject(MonitorItem* pPro
{
dlg.m_sName = pProject->name;
dlg.m_sPathOrURL = pProject->wcPathOrUrl;
- dlg.m_sUsername = CStringUtils::Decrypt(pProject->userName).get();
- dlg.m_sPassword = CStringUtils::Decrypt(pProject->password).get();
+ auto username = CStringUtils::Decrypt(pProject->userName);
+ dlg.m_sUsername = username == nullptr ? CString("") : username.get();
+ auto password = CStringUtils::Decrypt(pProject->password);
+ dlg.m_sPassword = password == nullptr ? CString("") : password.get();
dlg.m_monitorInterval = pProject->interval;
dlg.m_sIgnoreRegex = pProject->sMsgRegex;
dlg.m_isParentPath = pProject->parentPath;
@@ -9009,7 +9011,11 @@ void CLogDlg::MonitorThread()
// we have to include the authentication in the URL itself
auto tempFile = CTempFiles::Instance().GetTempFilePath(true);
auto callback = std::make_unique<CCallback>();
- callback->SetAuthData(CStringUtils::Decrypt(item.userName).get(), CStringUtils::Decrypt(item.password).get());
+ auto username = CStringUtils::Decrypt(item.userName);
+ auto password = CStringUtils::Decrypt(item.password);
+ if (username == nullptr || password == nullptr)
+ continue;
+ callback->SetAuthData(username.get(), password.get());
DeleteFile(tempFile.GetWinPath());
HRESULT hResUdl = URLDownloadToFile(nullptr, item.wcPathOrUrl, tempFile.GetWinPath(), 0, callback.get());
if (m_bCancelled)
@@ -9134,7 +9140,11 @@ void CLogDlg::MonitorThread()
sCheckInfo.Format(IDS_MONITOR_CHECKPROJECT, static_cast<LPCWSTR>(
item.name));
if (!m_bCancelled)
SetDlgItemText(IDC_LOGINFO, sCheckInfo);
- svn.SetAuthInfo(CStringUtils::Decrypt(item.userName).get(), CStringUtils::Decrypt(item.password).get());
+ auto username = CStringUtils::Decrypt(item.userName);
+ auto password = CStringUtils::Decrypt(item.password);
+ if (username == nullptr || password == nullptr)
+ continue;
+ svn.SetAuthInfo(username.get(), password.get());
svn_revnum_t head = svn.GetHEADRevision(wcPathOrUrl, false);
if (m_bCancelled)
continue;
@@ -9293,6 +9303,8 @@ void CLogDlg::MonitorThread()
{
auto du = CStringUtils::Decrypt(item.userName);
auto dp = CStringUtils::Decrypt(item.password);
+ if (du == nullptr || dp == nullptr)
+ continue;
std::wstring sU;
std::wstring sP;
auto pU = du.get();