summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2017-12-06 20:08:08 +0100
committerEike Rathke <erack@redhat.com>2017-12-06 20:10:50 +0100
commit7265e75f8b34cc1043b972478e8b499566660f86 (patch)
treeed9c515ba18c966655c3ae9d45c4673da8266f04
parentc9f712bdfbad1ad16f0721d889167eb232917eab (diff)
Prevent out-of-bounds access, tdf#114228 related
Such document access should be validated, specifically if it's called from accessibility. Change-Id: I67fa14c7fb1bf3885fc009428b981149f3f448fb Reviewed-on: https://gerrit.libreoffice.org/45978 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
-rw-r--r--sc/source/core/data/document.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 2151269a1612..2d1834d57cd9 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -3681,7 +3681,7 @@ sal_uInt32 ScDocument::GetNumberFormat( const ScRange& rRange ) const
SCCOL nCol1 = rRange.aStart.Col(), nCol2 = rRange.aEnd.Col();
SCROW nRow1 = rRange.aStart.Row(), nRow2 = rRange.aEnd.Row();
- if (!ValidTab(nTab1) || !ValidTab(nTab2) || !maTabs[nTab1] || !maTabs[nTab2])
+ if (!TableExists(nTab1) || !TableExists(nTab2))
return 0;
sal_uInt32 nFormat = 0;