summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-10-16 21:15:50 +0100
committerCaolán McNamara <caolan.mcnamara@collabora.com>2024-11-07 11:57:42 +0100
commit54f5e44f580aa3eb8c498f27049f0f7e92ba2ffe (patch)
treeb0aa73818f87af4dac03203a8247736d9e720e69
parent6ec7e5bb895a1d8ac4c5fc9e1d2855d189f3685a (diff)
cid#1606697 silence Overflowed constant
Change-Id: I81d0b10f8e0c34f9d276e59b5eed2c3d879f05cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176195 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
-rw-r--r--tools/source/fsys/urlobj.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx
index 5e200867a5cc..84a89cd32808 100644
--- a/tools/source/fsys/urlobj.cxx
+++ b/tools/source/fsys/urlobj.cxx
@@ -2656,6 +2656,7 @@ bool INetURLObject::parseHost(sal_Unicode const *& rBegin, sal_Unicode const * p
}
else if (rtl::isAsciiHexDigit(*p) && nDigits < 4)
{
+ assert(nNumber < 0xffff);
nNumber = 16 * nNumber + INetMIME::getHexWeight(*p);
++nDigits;
}
@@ -2719,6 +2720,7 @@ bool INetURLObject::parseHost(sal_Unicode const *& rBegin, sal_Unicode const * p
}
else if (rtl::isAsciiDigit(*p) && nDigits < 3)
{
+ assert(nNumber < 0xfff);
nNumber = 16 * nNumber + INetMIME::getWeight(*p);
++nDigits;
}
@@ -2752,6 +2754,7 @@ bool INetURLObject::parseHost(sal_Unicode const *& rBegin, sal_Unicode const * p
}
else if (rtl::isAsciiHexDigit(*p) && nDigits < 4)
{
+ assert(nNumber < 0xffff);
nNumber = 16 * nNumber + INetMIME::getHexWeight(*p);
++nDigits;
}
@@ -2809,6 +2812,7 @@ bool INetURLObject::parseHost(sal_Unicode const *& rBegin, sal_Unicode const * p
}
else if (rtl::isAsciiDigit(*p) && nDigits < 3)
{
+ assert(nNumber < 0xfff);
nNumber = 16 * nNumber + INetMIME::getWeight(*p);
++nDigits;
}