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-07 13:05:09 +0100
commitd17dfb3dc1cc7fd91ede9a58337d89e38fd3b022 (patch)
tree9c40fcf0a6f4a879fc4da566d8c2aebf344e2e44
parent89853de3231e92a17a646acb7f99584220fadad8 (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> (cherry picked from commit 7265e75f8b34cc1043b972478e8b499566660f86) Reviewed-on: https://gerrit.libreoffice.org/45979 Tested-by: Jenkins <ci@libreoffice.org>
-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;