diff options
author | Sean Finney <seanius@debian.org> | 2009-06-24 22:49:04 +0200 |
---|---|---|
committer | Sean Finney <seanius@debian.org> | 2009-06-24 22:49:04 +0200 |
commit | 84f4ca9b07fe5b73d840258f4aa7c1eb534c4253 (patch) | |
tree | 9829bd578af8a4a8b42b04277f9067e00dc5ad90 /ext/mcrypt/mcrypt.c | |
parent | 6821b67124604da690c5e9276d5370d679c63ac8 (diff) | |
download | php-upstream/5.3.0_RC4.tar.gz |
Imported Upstream version 5.3.0~RC4upstream/5.3.0_RC4upstream/5.3.0.RC4
Diffstat (limited to 'ext/mcrypt/mcrypt.c')
-rw-r--r-- | ext/mcrypt/mcrypt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/mcrypt/mcrypt.c b/ext/mcrypt/mcrypt.c index 4cb50f5e2..2a28bf609 100644 --- a/ext/mcrypt/mcrypt.c +++ b/ext/mcrypt/mcrypt.c @@ -16,7 +16,7 @@ | Derick Rethans <derick@derickrethans.nl> | +----------------------------------------------------------------------+ */ -/* $Id: mcrypt.c,v 1.91.2.3.2.11.2.16 2008/12/31 11:15:38 sebastian Exp $ */ +/* $Id: mcrypt.c,v 1.91.2.3.2.11.2.18 2009/06/06 02:40:48 mattwil Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1373,7 +1373,7 @@ PHP_FUNCTION(mcrypt_create_iv) } if (size <= 0 || size >= INT_MAX) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Can not create an IV with a size of less then 1 or greater then %d", INT_MAX); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot create an IV with a size of less than 1 or greater than %d", INT_MAX); RETURN_FALSE; } @@ -1424,7 +1424,7 @@ PHP_FUNCTION(mcrypt_create_iv) } else { n = size; while (size) { - iv[--size] = 255.0 * php_rand(TSRMLS_C) / RAND_MAX; + iv[--size] = (char) (255.0 * php_rand(TSRMLS_C) / RAND_MAX); } } RETURN_STRINGL(iv, n, 0); |