com php-src: improve condition: ext/mcrypt/mcrypt.c

From: Date: Wed, 12 Aug 2015 12:50:43 +0000
Subject: com php-src: improve condition: ext/mcrypt/mcrypt.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-88493@lists.php.net to get a copy of this message
Commit: 2366a070c819f96d47f28021e76e0f01a7e1f7f4 Author: Anatol Belski <ab@php.net> Wed, 12 Aug 2015 10:58:21 +0200 Parents: b7031ba743fd8ca8f6e64df871054b796a979da0 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=2366a070c819f96d47f28021e76e0f01a7e1f7f4 Log: improve condition same as CSPRNG, break by EOF Changed paths: M ext/mcrypt/mcrypt.c Diff: diff --git a/ext/mcrypt/mcrypt.c b/ext/mcrypt/mcrypt.c index bdb119f..a9098ed 100644 --- a/ext/mcrypt/mcrypt.c +++ b/ext/mcrypt/mcrypt.c @@ -1377,7 +1377,7 @@ PHP_FUNCTION(mcrypt_create_iv) while (read_bytes < size) { n = read(*fd, iv + read_bytes, size - read_bytes); - if (n < 0) { + if (n <= 0) { break; } read_bytes += n;

« previous php.cvs (#88493) next »