summaryrefslogtreecommitdiff
path: root/indra/llcommon/llmd5.cpp
diff options
context:
space:
mode:
authorRye <rye@alchemyviewer.org>2025-10-26 02:53:52 -0400
committerRye <rye@alchemyviewer.org>2025-10-27 04:59:15 -0400
commit5964e02894f2d9387080fbd848f0db02abd06356 (patch)
tree09d9999e9d51bb6360a59b83c6bf028fcfb89e7a /indra/llcommon/llmd5.cpp
parentbd3a7c9b3a7d1023c4ab87d876860552fd039747 (diff)
Fix memcpy of 0 being reported as undefined behavior by ubsan
Signed-off-by: Rye <rye@alchemyviewer.org>
Diffstat (limited to 'indra/llcommon/llmd5.cpp')
-rw-r--r--indra/llcommon/llmd5.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/indra/llcommon/llmd5.cpp b/indra/llcommon/llmd5.cpp
index c8ca586e7f..ae7468aa22 100644
--- a/indra/llcommon/llmd5.cpp
+++ b/indra/llcommon/llmd5.cpp
@@ -262,6 +262,8 @@ void LLMD5::raw_digest(unsigned char* s) const
void LLMD5::hex_digest(char* s) const
{
+ if(!s) return;
+
if (!finalized)
{
std::cerr << "LLMD5::hex_digest: Can't get digest if you haven't "