summaryrefslogtreecommitdiffstats
path: root/sc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2017-12-06 20:08:08 +0100
committerAndras Timar <andras.timar@collabora.com>2019-08-22 11:52:38 +0200
commitf18f8fdc661ba2d1719421cf0f932bf745258b06 (patch)
tree4e848b26bfc7aa8a061189ff988c8709732d3975 /sc
parenttdf#121198: fix crash in SdrPage::GetPageNum() (diff)
downloadcore-f18f8fdc661ba2d1719421cf0f932bf745258b06.tar.gz
core-f18f8fdc661ba2d1719421cf0f932bf745258b06.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)
Diffstat (limited to 'sc')
-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 2b4bf337f40b..9cbb085addbe 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -3621,7 +3621,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;