From: Remi Collet Date: Wed, 22 May 2013 06:28:05 +0000 (+0200) Subject: Fixed bug #64895 Integer overflow in SndToJewish X-Git-Tag: php-5.4.16RC1~1^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fc2a9d6e47ae23adb28122539b56df0d6195bdce;p=php Fixed bug #64895 Integer overflow in SndToJewish --- diff --git a/NEWS b/NEWS index ce86bb2f58..23f1e8e1a8 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,9 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? 2013, PHP 5.3.26 +- Calendar: + . Fixed bug #64895 (Integer overflow in SndToJewish). (Remi) + - FPM: . Fixed some possible memory or resource leaks and possible null dereference detected by code coverity scan. (Remi) diff --git a/ext/calendar/jewish.c b/ext/calendar/jewish.c index 1e7a06c8a6..fcc0e5c0b8 100644 --- a/ext/calendar/jewish.c +++ b/ext/calendar/jewish.c @@ -272,7 +272,7 @@ #define HALAKIM_PER_METONIC_CYCLE (HALAKIM_PER_LUNAR_CYCLE * (12 * 19 + 7)) #define JEWISH_SDN_OFFSET 347997 -#define JEWISH_SDN_MAX 38245310 /* year 103759, 100000 A.D. */ +#define JEWISH_SDN_MAX 324542846L /* 12/13/887605, greater value raises interger overflow */ #define NEW_MOON_OF_CREATION 31524 #define SUNDAY 0 diff --git a/ext/calendar/tests/jdtojewish64.phpt b/ext/calendar/tests/jdtojewish64.phpt index 50f7f33c7b..9f01109a71 100644 --- a/ext/calendar/tests/jdtojewish64.phpt +++ b/ext/calendar/tests/jdtojewish64.phpt @@ -1,5 +1,5 @@ --TEST-- -Integer overflow in SndToJewish leads to php hang +Bug #64895: Integer overflow in SndToJewish --SKIPIF-- --FILE--