diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2007-02-15 01:15:45 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2007-02-15 01:15:45 +0000 |
commit | ed6725c69514a1044d356cfc40d6944ebfdae3a2 (patch) | |
tree | 703110b51a6c7dc87ff807bb71662f7771d03c63 | |
parent | f8958c466db4fd7358fa8c68e306ee67bb1d877b (diff) | |
download | php-git-ed6725c69514a1044d356cfc40d6944ebfdae3a2.tar.gz |
Improved validation route for size parameter of the mcrypt_create_iv()
function.
-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 6f3561cacd..12242ed017 100644 --- a/ext/mcrypt/mcrypt.c +++ b/ext/mcrypt/mcrypt.c @@ -1242,8 +1242,8 @@ PHP_FUNCTION(mcrypt_create_iv) return; } - if (size <= 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Can not create an IV with size 0 or smaller"); + if (size <= 0 || size >= 2147483647) { + 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); RETURN_FALSE; } |