sc/source/core/tool/interpr2.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 716f4ef1625cece6fe8326213df24c52d56c9432
Author: Winfried Donkers <winfrieddonk...@libreoffice.org>
Date:   Thu Jun 23 15:57:38 2016 +0200

    tdf#100562 Add constraints for function DB
    
    Constraints in 
http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part2.html#DB
    were not all checked.
    
    Change-Id: Ife9ff7ce73d239efd0a67625990493db770f0c20
    Reviewed-on: https://gerrit.libreoffice.org/26606
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com>

diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx
index 2eae22b..ac20f10 100644
--- a/sc/source/core/tool/interpr2.cxx
+++ b/sc/source/core/tool/interpr2.cxx
@@ -1528,7 +1528,8 @@ void ScInterpreter::ScDB()
     double nRest = GetDouble();
     double nValue = GetDouble();
     if (nMonths < 1.0 || nMonths > 12.0 || nTimeLength > 1200.0 || nRest < 0.0 
||
-        nPeriod > (nTimeLength + 1.0) || nRest > nValue || nValue < 0.0)
+        nPeriod > (nTimeLength + 1.0) || nRest > nValue || nValue <= 0.0 ||
+        nTimeLength <= 0 || nPeriod <= 0 )
     {
         PushIllegalArgument();
         return;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to