summaryrefslogtreecommitdiff
path: root/indra/newview/llversioninfo.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2023-10-17 06:33:05 -0400
committerNat Goodspeed <nat@lindenlab.com>2023-10-17 06:33:05 -0400
commit117f07e5a4b7882a44681c730dcc0628238cfec6 (patch)
tree5cf60970252ad671fdd352062ae41950f318a82b /indra/newview/llversioninfo.cpp
parent19f453fc2007f780ae5d819090db206f07d0a9c6 (diff)
SL-18837: Avoid stuffing build number into 32-bit int.
Even though LLVersionInfo::getBuild() already returns a 64-bit int, various consumers assumed it could fit into 32 bits. It was especially bad to pass it to a classic C style varargs function. Only on a little-endian CPU, and only because it was the last argument, the damage was limited to truncation -- instead of arbitrary undefined behavior. Where the consumer doesn't support 64-bit ints, pass as string instead.
Diffstat (limited to 'indra/newview/llversioninfo.cpp')
-rw-r--r--indra/newview/llversioninfo.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/indra/newview/llversioninfo.cpp b/indra/newview/llversioninfo.cpp
index 62bfa24e29..9551df7bee 100644
--- a/indra/newview/llversioninfo.cpp
+++ b/indra/newview/llversioninfo.cpp
@@ -69,7 +69,7 @@ void LLVersionInfo::initSingleton()
// fully constructed; such calls don't really belong in the constructor.
// cache the version string
- version = STRINGIZE(getShortVersion() << "." << getBuild());
+ version = stringize(getShortVersion(), ".", getBuild());
}
LLVersionInfo::~LLVersionInfo()
@@ -91,7 +91,7 @@ S32 LLVersionInfo::getPatch()
return LL_VIEWER_VERSION_PATCH;
}
-S64 LLVersionInfo::getBuild()
+U64 LLVersionInfo::getBuild()
{
return LL_VIEWER_VERSION_BUILD;
}