oops, the 0th byte should be set, too

This commit is contained in:
Sascha Schumann 1999-04-25 21:50:24 +00:00
parent 77baa4ebb4
commit c62ffa7e01

View File

@ -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);