cid#1660010 Overflowed constant
Change-Id: Ie8d50e3178713029197a1df3a80ce3319c0f77ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190107 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
This commit is contained in:
@@ -1538,6 +1538,13 @@ static bool convertDurationHelper(util::Duration& rDuration, V string)
|
||||
bSuccess = false;
|
||||
}
|
||||
|
||||
if (bSuccess)
|
||||
{
|
||||
bSuccess = nYears >= std::numeric_limits<sal_Int16>::min() &&
|
||||
nYears <= std::numeric_limits<sal_Int16>::max();
|
||||
SAL_WARN_IF(!bSuccess, "sax", "convertDurationHelper: year overflow: " << nYears);
|
||||
}
|
||||
|
||||
if (bSuccess)
|
||||
{
|
||||
rDuration.Negative = bIsNegativeDuration;
|
||||
|
||||
Reference in New Issue
Block a user