[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - sc/source

Julien Nabet serval2412 at yahoo.fr
Thu May 29 03:05:59 PDT 2014


 sc/source/core/tool/interpr1.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4f24e3d480bb88a568de10b4d81116766b136c91
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Wed May 28 20:30:36 2014 +0200

    Related fdo#75971 Crash when invoking "Insert > Names > Create"
    
    bt:
    0x00002aaac837cd3c in rtl::OUString::copy (this=0x7ffffffec760, beginIndex=-2147483595) at /home/julien/compile-libreoffice/libreoffice/include/rtl/ustring.hxx:1464
    0x00002aaac87604ea in ScInterpreter::ScRight (this=0x8a6b7a0) at /home/julien/compile-libreoffice/libreoffice/sc/source/core/tool/interpr1.cxx:8106
    0x00002aaac879be5c in ScInterpreter::Interpret (this=0x8a6b7a0) at /home/julien/compile-libreoffice/libreoffice/sc/source/core/tool/interpr4.cxx:4150
    
    So apply similar fix http://cgit.freedesktop.org/libreoffice/core/commit/?id=37d7d115dd346ba7a713a5a18d90fc48a0d35072
    to scRight
    
    Cherry-picked from b41504503cdf4ac562f82e668bf2fe9217260493
    
    Change-Id: I576e82cd033f0e0e5f9e9cbb9dd5f569782bbbc4
    Reviewed-on: https://gerrit.libreoffice.org/9536
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 9223dc6..bae7962 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -8091,7 +8091,7 @@ void ScInterpreter::ScRight()
         if (nParamCount == 2)
         {
             double nVal = ::rtl::math::approxFloor(GetDouble());
-            if ( nVal < 0.0 || nVal > SAL_MAX_UINT16 )
+            if ( rtl::math::isNan(nVal) || nVal < 0.0 || nVal > SAL_MAX_UINT16 )
             {
                 PushIllegalArgument();
                 return ;


More information about the Libreoffice-commits mailing list