xref: /PHP-7.0/ext/calendar/tests/bug71894.phpt (revision f67ccd4a)
1--TEST--
2Bug #71894 (AddressSanitizer: global-buffer-overflow in zif_cal_from_jd)
3--SKIPIF--
4<?php
5if (!extension_loaded('calendar')) die('skip ext/calendar required');
6?>
7--FILE--
8<?php
9var_dump(cal_from_jd(347997, CAL_JEWISH));
10var_dump(jdmonthname(347997,CAL_MONTH_JEWISH));?>
11--EXPECT--
12array(9) {
13  ["date"]=>
14  string(5) "0/0/0"
15  ["month"]=>
16  int(0)
17  ["day"]=>
18  int(0)
19  ["year"]=>
20  int(0)
21  ["dow"]=>
22  NULL
23  ["abbrevdayname"]=>
24  string(0) ""
25  ["dayname"]=>
26  string(0) ""
27  ["abbrevmonth"]=>
28  string(0) ""
29  ["monthname"]=>
30  string(0) ""
31}
32string(0) ""
33