summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-10-07 12:54:18 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-10-07 17:41:23 +0200
commit97cf7321e0cddae4570c6ec4c5fb5b55764c26fa (patch)
tree008fbd52b82bbbb61c6befad7076410810ad5643
parentd7358047d9bcee8368a940bfb75b41fb65f87514 (diff)
ofz: Integer-overflow
Change-Id: Ib0c1863c5fed92622b4bd601021a1174cf6ee68d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123213 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--connectivity/source/commontools/dbconversion.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/connectivity/source/commontools/dbconversion.cxx b/connectivity/source/commontools/dbconversion.cxx
index e7df86d39215..fe26e3341d9f 100644
--- a/connectivity/source/commontools/dbconversion.cxx
+++ b/connectivity/source/commontools/dbconversion.cxx
@@ -273,7 +273,7 @@ namespace dbtools
static void addDays(const sal_Int32 nDays, css::util::Date& _rDate)
{
- sal_Int32 nTempDays = implRelativeToAbsoluteNull( _rDate );
+ sal_Int64 nTempDays = implRelativeToAbsoluteNull(_rDate);
nTempDays += nDays;
if ( nTempDays > maxDays )
@@ -296,7 +296,7 @@ namespace dbtools
static void subDays(const sal_Int32 nDays, css::util::Date& _rDate )
{
- sal_Int32 nTempDays = implRelativeToAbsoluteNull( _rDate );
+ sal_Int64 nTempDays = implRelativeToAbsoluteNull(_rDate);
nTempDays -= nDays;
if ( nTempDays > maxDays )