Skip to content

Conversation

@rhauser
Copy link
Contributor

@rhauser rhauser commented Oct 24, 2025

While debugging a crash colleagues of mine noticed that the strncat() call in uhal/log/src/common/exception.cpp seems to be off by one. strncat always adds a trailing null byte, so the size argument should be one less than the actual buffer space provided.

This function appends at most ssize non-null bytes from the array pointed to by src, followed by a null character, to the end of the string pointed to by dst. dst must point to
a string contained in a buffer that is large enough, that is, the buffer size must be at least strlen(dst) + strnlen(src, ssize) + 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant