I'd like to get this into libreoffice-3-4 - please double check for
this sort of snafu, with OOB indexes now crashing where previously they
returned null :-)
It fixes half of the testtool startup problem.
From 20c2f97b598018e1934707d7a659db9a6cc2af0c Mon Sep 17 00:00:00 2001
From: Michael Meeks <michael.meeks@novell.com>
Date: Mon, 9 May 2011 21:43:31 +0100
Subject: [PATCH] fix crash with out of bound accelerater vector access fdo#36802
---
vcl/source/window/accel.cxx | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/vcl/source/window/accel.cxx b/vcl/source/window/accel.cxx
index 83b765f..c17bd20 100644
--- a/vcl/source/window/accel.cxx
+++ b/vcl/source/window/accel.cxx
@@ -118,7 +118,9 @@ static void ImplAccelEntryInsert( ImplAccelList* pList, ImplAccelEntry* pEntry )
do
{
nIndex++;
- ImplAccelEntry* pTempEntry = (*pList)[ nIndex ];
+ ImplAccelEntry* pTempEntry = NULL;
+ if ( nIndex < pList->size() )
+ pTempEntry = (*pList)[ nIndex ];
if ( !pTempEntry || (pTempEntry->mnId != pEntry->mnId) )
break;
}
--
1.7.3.4
--
michael.meeks@novell.com <><, Pseudo Engineer, itinerant idiot
Context
- [Libreoffice] REVIEW: vector regression ... · Michael Meeks
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.