vcl/jsdialog/executor.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4637b12be47433691c19bbd0c5f46ee70062aff8
Author:     Szymon Kłos <[email protected]>
AuthorDate: Tue Nov 3 11:32:21 2020 +0100
Commit:     Szymon Kłos <[email protected]>
CommitDate: Thu Nov 26 09:18:48 2020 +0100

    jsdialog: prevent from crash
    
    Change-Id: If17738b7f58037929e29def75736434c33649b42
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106590
    Tested-by: Jenkins
    Reviewed-by: Szymon Kłos <[email protected]>

diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx
index 93dae7db3a2d..6ded26055270 100644
--- a/vcl/jsdialog/executor.cxx
+++ b/vcl/jsdialog/executor.cxx
@@ -67,7 +67,7 @@ bool ExecuteAction(sal_uInt64 nWindowId, const OString& 
rWidget, StringMap& rDat
                 if (sAction == "selected")
                 {
                     int separatorPos = rData["data"].indexOf(';');
-                    if (separatorPos)
+                    if (separatorPos > 0)
                     {
                         OUString entryPos = rData["data"].copy(0, 
separatorPos);
                         OString posString = OUStringToOString(entryPos, 
RTL_TEXTENCODING_ASCII_US);
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to