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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Dec 5 10:01:59 UTC 2018


 sc/source/core/opencl/op_statistical.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 866eb1c49d385f497aa1585284393343910098ab
Author:     Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Tue Dec 4 12:57:55 2018 +0100
Commit:     Luboš Luňák <l.lunak at collabora.com>
CommitDate: Wed Dec 5 11:01:32 2018 +0100

    OpenCL NORMDIST() error checking
    
    Change-Id: I15636a64ad869bf874fc6e2ada87842050da1a9a
    Reviewed-on: https://gerrit.libreoffice.org/64544
    Tested-by: Jenkins
    Reviewed-by: Luboš Luňák <l.lunak at collabora.com>

diff --git a/sc/source/core/opencl/op_statistical.cxx b/sc/source/core/opencl/op_statistical.cxx
index fd4508727d87..9e1637f0bfc3 100644
--- a/sc/source/core/opencl/op_statistical.cxx
+++ b/sc/source/core/opencl/op_statistical.cxx
@@ -4051,6 +4051,8 @@ void OpNormdist::GenSlidingWindowFunction(
     ss << "mue = tmp1;\n";
     ss << "sigma = tmp2;\n";
     ss << "c = tmp3;\n";
+    ss << "if(sigma <= 0)\n";
+    ss << "    return CreateDoubleError(IllegalArgument);\n";
     ss << "double mid,tmp;\n";
     ss << "mid = (x - mue)/sigma;\n";
     ss << "if(c)\n";


More information about the Libreoffice-commits mailing list