mirror of
https://github.com/php/php-src.git
synced 2024-11-23 09:54:15 +08:00
oops, the 0th byte should be set, too
This commit is contained in:
parent
77baa4ebb4
commit
c62ffa7e01
@ -188,8 +188,8 @@ PHP_FUNCTION(mcrypt_create_iv)
|
||||
read(fd, iv, i);
|
||||
close(fd);
|
||||
} else {
|
||||
while(i--) {
|
||||
iv[i] = rand();
|
||||
while(i) {
|
||||
iv[--i] = rand();
|
||||
}
|
||||
}
|
||||
RETURN_STRINGL(iv, size->value.lval, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user