On Thursday, March 6, 2025 at 1:58:16 PM UTC+1 [email protected] wrote:
Hi,
I've encountered a crash when starting Project Monitor (or probably rather
when it does the first check of the monitored repos).
I've debugged it and the crash occurs in LogDlg.Cpp:
callback->SetAuthData(CStringUtils::Decrypt(item.userName).get(),
CStringUtils::Decrypt(item.password).get());
>From what I can tell, the call to CryptUnprotectData fails, returning a
nullptr and the call to .get() above fails.
if (CryptUnprotectData(&blobIn, &descr, nullptr, nullptr, nullptr,
CRYPTPROTECT_UI_FORBIDDEN, &blobOut) == FALSE)
return nullptr;
returning a nullptr when the method is declared to return an
std::unique_ptr returns an empty unique_ptr. So calling .get() will never
crash.
but, unlike CString which one can assign a nullptr, one can not assign a
nullptr to an std string. So only that will crash.
I took only part of your patch because as mentioned it's perfectly fine to
assign a nullptr to a CString.
Committed the fix in r29751
Stefan
--
You received this message because you are subscribed to the Google Groups
"TortoiseSVN-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/tortoisesvn-dev/48d96b05-5e84-43a3-b863-6e80da2ddd7fn%40googlegroups.com.