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

New commits:
commit 9fd15d9e37678056341abfc74e15edb27acf95de
Author: Miklos Vajna <vmik...@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
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to