Skip to content

Commit cfaffd2

Browse files
author
Sascha Schumann
committed
overflow check for _php_math_basetozval
1 parent 397277b commit cfaffd2

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

ext/standard/tests/math/hexdec.phpt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
--TEST--
2+
overflow check for _php_math_basetozval
3+
--FILE--
4+
<?php
5+
6+
var_dump(hexdec("012345"));
7+
var_dump(hexdec("12345"));
8+
var_dump(hexdec("q12345"));
9+
var_dump(hexdec("12345+?!"));
10+
var_dump(hexdec("12345q"));
11+
var_dump(hexdec("1234500001"));
12+
var_dump(hexdec("17fffffff"));
13+
--EXPECT--
14+
int(74565)
15+
int(74565)
16+
int(74565)
17+
int(74565)
18+
int(74565)
19+
float(78187069441)
20+
float(6442450943)

0 commit comments

Comments
 (0)