sc/source/core/data/document.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7265e75f8b34cc1043b972478e8b499566660f86
Author: Eike Rathke <er...@redhat.com>
Date:   Wed Dec 6 20:08:08 2017 +0100

    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 <er...@redhat.com>
    Tested-by: Eike Rathke <er...@redhat.com>

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;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to