mirror of
https://github.com/php/php-src.git
synced 2024-10-01 06:46:08 +00:00
7e8276ca68
Fixed a memory allocation bug in crypt() SHA256/512 that can cause segmentation faults when passed in salts with a null byte early.
10 lines
177 B
PHP
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!
|