[Libreoffice-commits] core.git: svtools/source

Arnaud Versini arnaud.versini at gmail.com
Mon Jun 16 03:54:58 PDT 2014


 svtools/source/control/toolbarmenu.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7eceffef49c9f498c5758d5e351c0f22126003e5
Author: Arnaud Versini <arnaud.versini at gmail.com>
Date:   Sun Jun 15 20:08:26 2014 +0200

    Resolve fdo#79913 by checking index bounds
    
    Change-Id: I023a625d73724332245d612a61cb786acefc4cf2
    Reviewed-on: https://gerrit.libreoffice.org/9791
    Reviewed-by: Jean-Baptiste Faure <jbfaure at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx
index d0f1e49..2be0e43 100644
--- a/svtools/source/control/toolbarmenu.cxx
+++ b/svtools/source/control/toolbarmenu.cxx
@@ -397,7 +397,7 @@ void ToolbarMenu_Impl::notifyHighlightedEntry()
                 if( pValueSet )
                     nChildIndex = static_cast< sal_Int32 >( pValueSet->GetItemPos( pValueSet->GetSelectItemId() ) );
 
-                if( nChildIndex >= pEntry->getAccessibleChildCount() )
+                if( (nChildIndex >= pEntry->getAccessibleChildCount()) || (nChildIndex < 0) )
                     return;
 
                 aNew <<= getAccessibleChild( pEntry->mpControl, nChildIndex );


More information about the Libreoffice-commits mailing list