Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
--TEST-- strnat(case)cmp(): potential OOB access for unterminated strings --EXTENSIONS-- z..
Decoded Output download
--TEST--
strnat(case)cmp(): potential OOB access for unterminated strings
--EXTENSIONS--
zend_test
--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)
Did this file decode correctly?
Original Code
--TEST--
strnat(case)cmp(): potential OOB access for unterminated strings
--EXTENSIONS--
zend_test
--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)
Function Calls
| zend_create_unterminated_string | 1 |
Stats
| MD5 | fd30ac8c7e268dfc0ec9e46e3052b584 |
| Eval Count | 0 |
| Decode Time | 68 ms |