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

Caolán McNamara caolanm at redhat.com
Sun Oct 29 20:24:30 UTC 2017


 svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit 6e4fc0508909af407e595d17b06a6b1d1cb36ba0
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Oct 29 14:23:50 2017 +0000

    ofz#3889 Divide-by-zero
    
    Change-Id: If02a4bd6d168e9b1d4574cfc730ecc24011eab62
    Reviewed-on: https://gerrit.libreoffice.org/44023
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx b/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx
index 9adb80e53c8d..9572e7ac491e 100644
--- a/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx
@@ -462,6 +462,10 @@ public:
         mpSecondArg( rSecondArg )
     {
     }
+#if defined(__clang__) || (defined (__GNUC__) && __GNUC__ >= 8)
+    //GetEquationValueAsDouble calls isFinite on the result
+    __attribute__((no_sanitize("float-divide-by-zero")))
+#endif
     static double getValue( const ExpressionFunct eFunct, const std::shared_ptr<ExpressionNode>& rFirstArg, const std::shared_ptr<ExpressionNode>& rSecondArg )
     {
         double fRet = 0;


More information about the Libreoffice-commits mailing list