diff options
author | Eike Rathke <erack@redhat.com> | 2016-06-09 14:43:44 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-06-09 13:06:22 +0000 |
commit | 1fbb941e63b8baf81e51c2fa161543c591c57db8 (patch) | |
tree | 6bd9e557bf8d19099a2070d8e27553199b450b7a /sc | |
parent | ee5644f3df0e727e9f31398e21d72727641193e5 (diff) |
Resolves: tdf#100285 EASTERSUNDAY() check valid year between 1583 and 9956
Change-Id: I4b25f1eb8e3cf0236b69607bb9ab9b4c57ae918a
(cherry picked from commit 2c08ec226e771de10c8863b7f1cda016fea442d2)
Reviewed-on: https://gerrit.libreoffice.org/26107
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/tool/interpr2.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx index 4a51f956be73..bd297494f195 100644 --- a/sc/source/core/tool/interpr2.cxx +++ b/sc/source/core/tool/interpr2.cxx @@ -287,6 +287,12 @@ void ScInterpreter::ScEasterSunday() nYear = (sal_Int16) ::rtl::math::approxFloor( GetDouble() ); if ( nYear < 100 ) nYear = pFormatter->ExpandTwoDigitYear( nYear ); + if (nYear < 1583 || nYear > 9956) + { + // Valid Gregorian and maximum year constraints not met. + PushIllegalArgument(); + return; + } // don't worry, be happy :) int B,C,D,E,F,G,H,I,K,L,M,N,O; N = nYear % 19; |