diff options
author | Sascha Schumann <sas@php.net> | 1999-04-25 21:50:24 +0000 |
---|---|---|
committer | Sascha Schumann <sas@php.net> | 1999-04-25 21:50:24 +0000 |
commit | c62ffa7e012b1eec4e102d4e80ca4923ba3dfe16 (patch) | |
tree | 4ee52b1b0804bb10ec62ac244ca4574fc6238f5f /ext/mcrypt | |
parent | 77baa4ebb4c323fed71eec0844ec4bcf3f12524a (diff) | |
download | php-git-c62ffa7e012b1eec4e102d4e80ca4923ba3dfe16.tar.gz |
oops, the 0th byte should be set, too
Diffstat (limited to 'ext/mcrypt')
-rw-r--r-- | ext/mcrypt/mcrypt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/mcrypt/mcrypt.c b/ext/mcrypt/mcrypt.c index 09d0c31dd2..65f1693637 100644 --- a/ext/mcrypt/mcrypt.c +++ b/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); |