php-src/ext/standard/tests/strings/bug62443.phpt
Anthony Ferrara 7e8276ca68 Fixed bug #62443 (Crypt SHA256/512 Segfaults With Malformed Salt)
Fixed a memory allocation bug in crypt() SHA256/512 that can
cause segmentation faults when passed in salts with a null byte
early.
2012-06-28 20:00:03 -04:00

10 lines
177 B
PHP

--TEST--
Bug #62443 Crypt SHA256/512 Segfaults With Malformed Salt
--FILE--
<?php
crypt("foo", '$5$'.chr(0).'abc');
crypt("foo", '$6$'.chr(0).'abc');
echo "OK!";
--EXPECT--
OK!