diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2018-12-04 12:57:55 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2018-12-06 12:49:49 +0100 |
commit | 168719432c10a87a86de4f494455c78844fdb81a (patch) | |
tree | ae9f3fba9c4153c422b568d7220da9f022672e51 /sc | |
parent | 6aa5db61725c46a3f4f6b310bac9db1c2984fe6f (diff) |
OpenCL NORMDIST() error checking
Change-Id: I15636a64ad869bf874fc6e2ada87842050da1a9a
Reviewed-on: https://gerrit.libreoffice.org/64544
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
(cherry picked from commit 866eb1c49d385f497aa1585284393343910098ab)
Reviewed-on: https://gerrit.libreoffice.org/64611
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/opencl/op_statistical.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
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"; |