summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2017-12-06 20:08:08 +0100
committerMichael Stahl <Michael.Stahl@cib.de>2019-08-02 14:08:19 +0200
commit28f755d598dba91166c0ff30575b9b742922b2f4 (patch)
treedabe03db2b0bd2b9f9c46d91b2971c4202a9d797
parenttdf#104407 writerfilter: fix crash with null xRangeProperties (diff)
downloadcore-28f755d598dba91166c0ff30575b9b742922b2f4.tar.gz
core-28f755d598dba91166c0ff30575b9b742922b2f4.zip
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> (cherry picked from commit d17dfb3dc1cc7fd91ede9a58337d89e38fd3b022)
-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 ec223b5c4e00..7904a719b962 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -3571,7 +3571,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;