blob: afc082a221064895ac4dddb5d989a3556af0e33d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
--TEST--
strnat(case)cmp(): potential OOB access for unterminated strings
--SKIPIF--
<?php
if (!function_exists('zend_create_unterminated_string')) die('skip zend_test extension not available');
?>
--FILE--
<?php
$a = zend_create_unterminated_string('333');
$b = zend_create_unterminated_string('333 ');
var_dump(
strnatcmp($a, $b),
strnatcasecmp($b, $a)
);
zend_terminate_string($a);
zend_terminate_string($b);
?>
--EXPECT--
int(-1)
int(1)
|