aboutsummaryrefslogtreecommitdiff
path: root/src/zencore/zencore.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2025-08-05 09:39:28 +0200
committerGitHub Enterprise <[email protected]>2025-08-05 09:39:28 +0200
commit34c8c53de8ddaff19e81fd1d3c520563c4f39a3b (patch)
treeb82bc18f6d7698954af497d49cf91f506346fc5b /src/zencore/zencore.cpp
parentDon't set m_DispatchComplete in ParallelWork until after pending work countdo... (diff)
downloadzen-34c8c53de8ddaff19e81fd1d3c520563c4f39a3b.tar.xz
zen-34c8c53de8ddaff19e81fd1d3c520563c4f39a3b.zip
de/stringbuilder safety (#456)
- Improvement: Safeguard FormatCallstack to not throw exceptions when building the callstack string - Improvement: Limit thread name length when setting it for debugger use - Improvemnet: Don't allow assert callbacks to throw exception - Improvement: When formatting log output for malformed attachments in a package message, allow the string buffer to grow instead of throwing exception
Diffstat (limited to 'src/zencore/zencore.cpp')
-rw-r--r--src/zencore/zencore.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/zencore/zencore.cpp b/src/zencore/zencore.cpp
index 82d28c0e3..51e06ae14 100644
--- a/src/zencore/zencore.cpp
+++ b/src/zencore/zencore.cpp
@@ -124,7 +124,14 @@ AssertImpl::ExecAssert(const char* Filename, int LineNumber, const char* Functio
AssertImpl* AssertImpl = CurrentAssertImpl;
while (AssertImpl)
{
- AssertImpl->OnAssert(Filename, LineNumber, FunctionName, Msg, Callstack);
+ try
+ {
+ AssertImpl->OnAssert(Filename, LineNumber, FunctionName, Msg, Callstack);
+ }
+ catch (const std::exception&)
+ {
+ // Just keep exception silent - we don't want exception thrown from assert callbacks
+ }
AssertImpl = AssertImpl->NextAssertImpl;
}
ThrowAssertException(Filename, LineNumber, FunctionName, Msg, Callstack);