Fix int overflows in conversation functions for calendar.
Add tests for the overflows.
| 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> |
int inputMonth,
int inputDay)
{
- int year;
+ zend_long year;
int month;
/* check for invalid dates */
int inputMonth,
int inputDay)
{
- int year;
+ zend_long year;
int month;
/* check for invalid dates */
--- /dev/null
+--TEST--
+gregoriantojd()
+--SKIPIF--
+<?php include 'skipif.inc'; ?>
+--FILE--
+<?php
+echo gregoriantojd(5, 5, 6000000) . "\n";
+?>
+--EXPECT--
+2193176185
--- /dev/null
+--TEST--
+juliantojd()
+--SKIPIF--
+<?php include 'skipif.inc'; ?>
+--FILE--
+<?php
+echo juliantojd(5, 5, 6000000000) . "\n";
+?>
+--EXPECT--
+622764916319