com php-src: Fix signedness in comparison in array_slice: ext/standard/array.c

From: Date: Thu, 07 Feb 2019 14:38:43 +0000
Subject: com php-src: Fix signedness in comparison in array_slice: ext/standard/array.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-104465@lists.php.net to get a copy of this message
Commit: 53d8fa5af71e91799402224d4a137c2ee759a187 Author: Nikita Popov <nikita.ppv@gmail.com> Thu, 7 Feb 2019 15:37:24 +0100 Parents: 689521af8e9b8c6ddbc3b51344baf0ec83e044b1 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=53d8fa5af71e91799402224d4a137c2ee759a187 Log: Fix signedness in comparison in array_slice Changed paths: M ext/standard/array.c Diff: diff --git a/ext/standard/array.c b/ext/standard/array.c index e8b0c64..972584a 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -3498,7 +3498,7 @@ PHP_FUNCTION(array_slice) } /* Clamp the offset.. */ - if (offset > num_in) { + if (offset > (zend_long) num_in) { ZVAL_EMPTY_ARRAY(return_value); return; } else if (offset < 0 && (offset = (num_in + offset)) < 0) {

« previous php.cvs (#104465) next »