diff options
author | Eike Rathke <erack@redhat.com> | 2016-06-09 14:43:44 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-06-09 14:47:52 +0200 |
commit | 2c08ec226e771de10c8863b7f1cda016fea442d2 (patch) | |
tree | ccaa1c291db30727007c33c0579ee08d58fe20bf /sc | |
parent | 40ca34340e4b387bdce92b86cb572556c5437c7d (diff) |
Resolves: tdf#100285 EASTERSUNDAY() check valid year between 1583 and 9956
Change-Id: I4b25f1eb8e3cf0236b69607bb9ab9b4c57ae918a
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 1abe634d654b..37594e2c6374 100644 --- a/sc/source/core/tool/interpr2.cxx +++ b/sc/source/core/tool/interpr2.cxx @@ -288,6 +288,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; |