File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed
Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -710,7 +710,7 @@ zend_long JewishToSdn(
710710 int yearLength ;
711711 int lengthOfAdarIAndII ;
712712
713- if (year <= 0 || year >= 6000 || day <= 0 || day > 30 ) {
713+ if (year <= 0 || year >= INT_MAX - 1 || day <= 0 || day > 30 ) {
714714 return (0 );
715715 }
716716 switch (month ) {
Original file line number Diff line number Diff line change 1+ --TEST--
2+ GH-21557 jewishtojd returns 0 for years >= 6000
3+ --CREDITS--
4+ oleibman
5+ --EXTENSIONS--
6+ calendar
7+ --FILE--
8+ <?php
9+ for ($ yh = 5995 ; $ yh < 6005 ; ++$ yh ) {
10+ $ rh = jewishtojd (1 , 1 , $ yh );
11+ echo "yh= $ yh rh= $ rh \n" ;
12+ }
13+ ?>
14+ --EXPECT--
15+ yh=5995 rh=2537279
16+ yh=5996 rh=2537633
17+ yh=5997 rh=2538016
18+ yh=5998 rh=2538371
19+ yh=5999 rh=2538725
20+ yh=6000 rh=2539110
21+ yh=6001 rh=2539463
22+ yh=6002 rh=2539818
23+ yh=6003 rh=2540202
24+ yh=6004 rh=2540557
You can’t perform that action at this time.
0 commit comments