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 <[email protected]>
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
--
[email protected] <><, Pseudo Engineer, itinerant idiot
_______________________________________________
LibreOffice mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice