From ac0dc48b63d93155304dfc44bd8f83adc4ae0825 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Fri, 18 Oct 2013 21:21:14 +0200 Subject: check fCount beforehand and bail out early, fdo#70000 related Change-Id: I47265cf0be9785e8be4b4be0b13d40cda206f349 --- sc/source/core/tool/interpr3.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sc/source/core/tool/interpr3.cxx b/sc/source/core/tool/interpr3.cxx index ee30c4869b9d..3699a3990e84 100644 --- a/sc/source/core/tool/interpr3.cxx +++ b/sc/source/core/tool/interpr3.cxx @@ -3850,7 +3850,7 @@ void ScInterpreter::CalculatePearsonCovar( bool _bPearson, bool _bStexy, bool _b } } } - if (fCount < (_bStexy ? 3.0 : 1.0)) // fCount==1 is handled by checking denominator later on + if (fCount < (_bStexy ? 3.0 : (_bSample ? 2.0 : 1.0))) // fCount==1 is handled by checking denominator later on PushNoValue(); else { -- cgit v1.2.3