File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -439,8 +439,7 @@ static void MoladOfMetonicCycle(
439
439
r1 = NEW_MOON_OF_CREATION ;
440
440
chk = (zend_long )metonicCycle ;
441
441
442
- if (chk > ((ZEND_LONG_MAX / (HALAKIM_PER_METONIC_CYCLE & 0xFFFF )) - NEW_MOON_OF_CREATION ) ||
443
- chk > (((ZEND_LONG_MAX / ((HALAKIM_PER_METONIC_CYCLE >> 16 ) & 0xFFFF ))) - (NEW_MOON_OF_CREATION >> 16 ))) {
442
+ if (chk > (ZEND_LONG_MAX - NEW_MOON_OF_CREATION ) / (HALAKIM_PER_METONIC_CYCLE & 0xFFFF )) {
444
443
* pMoladDay = 0 ;
445
444
* pMoladHalakim = 0 ;
446
445
return ;
@@ -450,6 +449,13 @@ static void MoladOfMetonicCycle(
450
449
* bits of the result will be in r2 and the lower 16 bits will be
451
450
* in r1. */
452
451
r1 += chk * (HALAKIM_PER_METONIC_CYCLE & 0xFFFF );
452
+
453
+ if (chk > (ZEND_LONG_MAX - (r1 >> 16 )) / ((HALAKIM_PER_METONIC_CYCLE >> 16 ) & 0xFFFF )) {
454
+ * pMoladDay = 0 ;
455
+ * pMoladHalakim = 0 ;
456
+ return ;
457
+ }
458
+
453
459
r2 = r1 >> 16 ;
454
460
r2 += chk * ((HALAKIM_PER_METONIC_CYCLE >> 16 ) & 0xFFFF );
455
461
You can’t perform that action at this time.
0 commit comments