mirror of
https://github.com/php/php-src.git
synced 2024-11-30 21:35:36 +08:00
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0: news entry for calendar overflow fix Fix integer overflow in calender.
This commit is contained in:
commit
2d865dfd35
3
NEWS
3
NEWS
@ -5,6 +5,9 @@ PHP NEWS
|
||||
|
||||
10 Nov 2016, PHP 7.1.0RC6
|
||||
|
||||
- Calendar:
|
||||
. Fix integer overflows (Joshua Rogers)
|
||||
|
||||
- Core:
|
||||
. Fixded bug #72736 (Slow performance when fetching large dataset with mysqli
|
||||
/ PDO). (Dmitry)
|
||||
|
@ -12,7 +12,7 @@
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Shane Caraveo <shane@caraveo.com> |
|
||||
| Authors: Shane Caraveo <shane@caraveo.com> |
|
||||
| Colin Viebrock <colin@easydns.com> |
|
||||
| Hartmut Holzgraefe <hholzgra@php.net> |
|
||||
| Wez Furlong <wez@thebrainroom.com> |
|
||||
|
@ -195,7 +195,7 @@ zend_long GregorianToSdn(
|
||||
int inputMonth,
|
||||
int inputDay)
|
||||
{
|
||||
int year;
|
||||
zend_long year;
|
||||
int month;
|
||||
|
||||
/* check for invalid dates */
|
||||
|
@ -217,7 +217,7 @@ zend_long JulianToSdn(
|
||||
int inputMonth,
|
||||
int inputDay)
|
||||
{
|
||||
int year;
|
||||
zend_long year;
|
||||
int month;
|
||||
|
||||
/* check for invalid dates */
|
||||
|
10
ext/calendar/tests/gregoriantojd_overflow.phpt
Normal file
10
ext/calendar/tests/gregoriantojd_overflow.phpt
Normal file
@ -0,0 +1,10 @@
|
||||
--TEST--
|
||||
gregoriantojd()
|
||||
--SKIPIF--
|
||||
<?php include 'skipif.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
echo gregoriantojd(5, 5, 6000000) . "\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
2193176185
|
10
ext/calendar/tests/juliantojd_overflow.phpt
Normal file
10
ext/calendar/tests/juliantojd_overflow.phpt
Normal file
@ -0,0 +1,10 @@
|
||||
--TEST--
|
||||
juliantojd()
|
||||
--SKIPIF--
|
||||
<?php include 'skipif.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
echo juliantojd(5, 5, 6000000000) . "\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
622764916319
|
Loading…
Reference in New Issue
Block a user