Browse Source

oops, the 0th byte should be set, too

experimental/newoperator
Sascha Schumann 27 years ago
parent
commit
c62ffa7e01
  1. 4
      ext/mcrypt/mcrypt.c

4
ext/mcrypt/mcrypt.c

@ -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…
Cancel
Save