com php-src: don't close stdin: ext/mcrypt/mcrypt.c
| From: | Anatol Belski | Date: | Sun, 09 Aug 2015 16:54:20 +0000 |
| Subject: | com php-src: don't close stdin: ext/mcrypt/mcrypt.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-88644@lists.php.net to get a copy of this message | ||
Commit: a91065c63ce51ea238db38d88ac12ea8e4adeb1e
Author: Anatol Belski <ab@php.net> Sun, 9 Aug 2015 18:54:20 +0200
Parents: a94ea9c97a5331d416c6256e5b01645188182054
Branches: PHP-7.0.0
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=a91065c63ce51ea238db38d88ac12ea8e4adeb1e
Log:
don't close stdin
Changed paths:
M ext/mcrypt/mcrypt.c
Diff:
diff --git a/ext/mcrypt/mcrypt.c b/ext/mcrypt/mcrypt.c
index 4c8f3a2..bf71e74 100644
--- a/ext/mcrypt/mcrypt.c
+++ b/ext/mcrypt/mcrypt.c
@@ -356,12 +356,12 @@ static PHP_GINIT_FUNCTION(mcrypt)
static PHP_GSHUTDOWN_FUNCTION(mcrypt)
{
- if (mcrypt_globals->fd[RANDOM] >= 0) {
+ if (mcrypt_globals->fd[RANDOM] > 0) {
close(mcrypt_globals->fd[RANDOM]);
mcrypt_globals->fd[RANDOM] = -1;
}
- if (mcrypt_globals->fd[URANDOM] >= 0) {
+ if (mcrypt_globals->fd[URANDOM] > 0) {
close(mcrypt_globals->fd[URANDOM]);
mcrypt_globals->fd[URANDOM] = -1;
}