[Libreoffice-commits] core.git: eventattacher/source
Miklos Vajna
vmiklos at collabora.co.uk
Thu Feb 27 04:29:53 PST 2014
eventattacher/source/eventattacher.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 9fd15d9e37678056341abfc74e15edb27acf95de
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Thu Feb 27 12:22:36 2014 +0100
eventattacher: fix out of bounds string access
Change-Id: Ic1f7ac2b6c3f5a865b316a83d92a0f2ff7616f5c
diff --git a/eventattacher/source/eventattacher.cxx b/eventattacher/source/eventattacher.cxx
index 08da9e3..d7f4715 100644
--- a/eventattacher/source/eventattacher.cxx
+++ b/eventattacher/source/eventattacher.cxx
@@ -624,7 +624,7 @@ Reference<XEventListener> EventAttacherImpl::attachListenerForTarget(
else
nIndex++;
- OUString aListenerName = (aListenerType[nIndex] == 'X') ? aListenerType.copy(nIndex+1) : aListenerType;
+ OUString aListenerName = (!aListenerType.isEmpty() && aListenerType[nIndex] == 'X') ? aListenerType.copy(nIndex+1) : aListenerType;
OUString aAddListenerName = "add" + aListenerName;
// Send Methods to the correct addListener-Method
More information about the Libreoffice-commits
mailing list