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

New commits:
commit 866eb1c49d385f497aa1585284393343910098ab
Author:     Luboš Luňák <l.lu...@collabora.com>
AuthorDate: Tue Dec 4 12:57:55 2018 +0100
Commit:     Luboš Luňák <l.lu...@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.lu...@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";
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to