[Libreoffice-commits] core.git: sc/source

Eike Rathke erack at redhat.com
Mon Jul 25 11:45:52 UTC 2016


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

New commits:
commit fb2c146752074b132d665e40343a08dcb2e6672e
Author: Eike Rathke <erack at redhat.com>
Date:   Mon Jul 25 13:32:17 2016 +0200

    use div() instead of /0 to content ubsan
    
    While we do handle double floating point division by 0 at least on
    IEEE754 systems, ubsan builds mock about.
    
    Change-Id: Ifff40fb917c6fb1cd6b7c812bc002c448b578f38

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 156da0f..dbbc55e 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -1695,7 +1695,7 @@ void ScInterpreter::ScTan()
 
 void ScInterpreter::ScCot()
 {
-    PushDouble(1.0 / ::rtl::math::tan(GetDouble()));
+    PushDouble( div( 1.0, ::rtl::math::tan(GetDouble())));
 }
 
 void ScInterpreter::ScArcSin()


More information about the Libreoffice-commits mailing list