mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Merge branch 'PHP-5.5'
* PHP-5.5: Fixed possible buffer overflow under Windows. Note: Not a security fix.
This commit is contained in:
commit
0959475e11
1 changed files with 1 additions and 1 deletions
|
@ -346,7 +346,7 @@ PHPAPI char *php_session_create_id(PS_CREATE_SID_ARGS) /* {{{ */
|
||||||
unsigned char rbuf[2048];
|
unsigned char rbuf[2048];
|
||||||
size_t toread = PS(entropy_length);
|
size_t toread = PS(entropy_length);
|
||||||
|
|
||||||
if (php_win32_get_random_bytes(rbuf, (size_t) toread) == SUCCESS){
|
if (php_win32_get_random_bytes(rbuf, MIN(toread, sizeof(rbuf))) == SUCCESS){
|
||||||
|
|
||||||
switch (PS(hash_func)) {
|
switch (PS(hash_func)) {
|
||||||
case PS_HASH_FUNC_MD5:
|
case PS_HASH_FUNC_MD5:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue