summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-02-27 12:22:36 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-02-27 13:29:29 +0100
commit9fd15d9e37678056341abfc74e15edb27acf95de (patch)
treebcb1eb81e420dc441cd120d33c4b26f34a9ee721
parent44c90b3d754faa3a0622423f4839194c85e219fa (diff)
eventattacher: fix out of bounds string access
Change-Id: Ic1f7ac2b6c3f5a865b316a83d92a0f2ff7616f5c
-rw-r--r--eventattacher/source/eventattacher.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/eventattacher/source/eventattacher.cxx b/eventattacher/source/eventattacher.cxx
index 08da9e3e44a6..d7f4715eb09b 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