desktop/source/deployment/misc/dp_version.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 25fd578d313962855626dc6426612a401b8099e1
Author: Caolán McNamara <[email protected]>
Date:   Thu Aug 15 11:50:47 2013 +0100

    Resolves: fdo#67539 intermittent crash on failed empty response during 
update
    
    version1 is empty and version2 is not, so on second segment of version2 the 
i1
    is already -1 from the first segment check -> kaboom
    
    (cherry picked from commit 3bb28b5aaef5e85a981dc9411db1f05524aeedf6)
    Reviewed-on: https://gerrit.libreoffice.org/5436
    Reviewed-by: Michael Stahl <[email protected]>
    Tested-by: Michael Stahl <[email protected]>
    (cherry picked from commit b6842e227d979c24b50fe5971d183f58df4788e3)
    
    Change-Id: Ic19511a3b150f40d3cd9cf66bf9d86c94f3f9187
    Reviewed-on: https://gerrit.libreoffice.org/5451
    Reviewed-by: Petr Mladek <[email protected]>
    Reviewed-by: Thorsten Behrens <[email protected]>
    Reviewed-by: Fridrich Strba <[email protected]>
    Tested-by: Fridrich Strba <[email protected]>

diff --git a/desktop/source/deployment/misc/dp_version.cxx 
b/desktop/source/deployment/misc/dp_version.cxx
index b6595a4..51add94 100644
--- a/desktop/source/deployment/misc/dp_version.cxx
+++ b/desktop/source/deployment/misc/dp_version.cxx
@@ -43,8 +43,8 @@ namespace dp_misc {
     OUString const & version1, OUString const & version2)
 {
     for (::sal_Int32 i1 = 0, i2 = 0; i1 >= 0 || i2 >= 0;) {
-        OUString e1(getElement(version1, &i1));
-        OUString e2(getElement(version2, &i2));
+        OUString e1(i1 >= 0 ? getElement(version1, &i1) : OUString());
+        OUString e2(i2 >= 0 ? getElement(version2, &i2) : OUString());
         if (e1.getLength() < e2.getLength()) {
             return ::dp_misc::LESS;
         } else if (e1.getLength() > e2.getLength()) {
_______________________________________________
Libreoffice-commits mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to