sc/source/core/opencl/op_financial.cxx | 3 +++ sc/source/core/opencl/op_statistical.cxx | 2 ++ 2 files changed, 5 insertions(+)
New commits: commit d5b45b81ff621744de3d9b4598cf36d2a6657a8c Author: Luboš Luňák <l.lu...@collabora.com> AuthorDate: Tue Dec 4 13:25:18 2018 +0100 Commit: Luboš Luňák <l.lu...@collabora.com> CommitDate: Thu Dec 6 12:50:04 2018 +0100 OpenCL FVSCHEDULE() error checking Change-Id: If93a9ea6e0265ba616b4a1fbe138d310ea3e8693 Reviewed-on: https://gerrit.libreoffice.org/64546 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lu...@collabora.com> (cherry picked from commit 3156228b1d737ca47ff4e959a6e357581af3ec2e) Reviewed-on: https://gerrit.libreoffice.org/64613 diff --git a/sc/source/core/opencl/op_financial.cxx b/sc/source/core/opencl/op_financial.cxx index 6f728cbbbdd2..66d1f9d18e28 100644 --- a/sc/source/core/opencl/op_financial.cxx +++ b/sc/source/core/opencl/op_financial.cxx @@ -750,8 +750,11 @@ void OpMDuration::GenSlidingWindowFunction(std::stringstream& ss, void Fvschedule::GenSlidingWindowFunction( std::stringstream &ss, const std::string &sSymName, SubArguments &vSubArguments) { + CHECK_PARAMETER_COUNT( 2, 2 ); FormulaToken* pCur = vSubArguments[1]->GetFormulaToken(); assert(pCur); + if(vSubArguments[0]->GetFormulaToken()->GetType() != formula::svDoubleVectorRef) + throw Unhandled( __FILE__, __LINE__ ); const formula::DoubleVectorRefToken* pCurDVR = static_cast<const formula::DoubleVectorRefToken *>(pCur); size_t nCurWindowSize = pCurDVR->GetRefRowSize(); commit 168719432c10a87a86de4f494455c78844fdb81a 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: Thu Dec 6 12:49:49 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> (cherry picked from commit 866eb1c49d385f497aa1585284393343910098ab) Reviewed-on: https://gerrit.libreoffice.org/64611 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