summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-07-17 08:30:59 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-07-17 12:33:45 +0200
commit18d9fb3c4ce3829c73a8f1007887c3176d43b06f (patch)
tree1b782f58458cbc02e786507415e08a4769fda4bd
parent972ff044edc502a0e382d9f5bb3a9d0bd0a95616 (diff)
ofz#9454 Integer-overflow
Change-Id: I6eecf45110d84951a892b4387a6a554aff198810 Reviewed-on: https://gerrit.libreoffice.org/57544 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sc/source/filter/xml/xmlfilti.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sc/source/filter/xml/xmlfilti.cxx b/sc/source/filter/xml/xmlfilti.cxx
index b51929eec871..45027f625ae4 100644
--- a/sc/source/filter/xml/xmlfilti.cxx
+++ b/sc/source/filter/xml/xmlfilti.cxx
@@ -26,6 +26,7 @@
#include <queryentry.hxx>
#include <document.hxx>
+#include <o3tl/safeint.hxx>
#include <svl/sharedstringpool.hxx>
#include <xmloff/xmltkmap.hxx>
#include <xmloff/nmspmap.hxx>
@@ -429,7 +430,7 @@ void SAL_CALL ScXMLConditionContext::endFastElement( sal_Int32 /*nElement*/ )
GetOperator(sOperator, mrQueryParam, rEntry);
SCCOLROW nStartPos = mrQueryParam.bByRow ? mrQueryParam.nCol1 : mrQueryParam.nRow1;
- rEntry.nField = nField + nStartPos;
+ rEntry.nField = o3tl::saturating_add(nField, nStartPos);
if (maQueryItems.empty())
{