cvs: php-src(PHP_5_0) / NEWS /ext/standard array.c /ext/standard/tests/array bug32021.phpt
| From: | Derick Rethans | Date: | Fri, 18 Feb 2005 13:39:46 +0000 |
| Subject: | cvs: php-src(PHP_5_0) / NEWS /ext/standard array.c /ext/standard/tests/array bug32021.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-30479@lists.php.net to get a copy of this message | ||
derick Fri Feb 18 08:39:46 2005 EDT
Added files: (Branch: PHP_5_0)
/php-src/ext/standard/tests/array bug32021.phpt
Modified files:
/php-src/ext/standard array.c
/php-src NEWS
Log:
- MFH: Fixed bug #32021: Crash caused by range('', 'z')
http://cvs.php.net/diff.php/php-src/ext/standard/array.c?r1=1.266.2.13&r2=1.266.2.14&ty=u
Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.266.2.13 php-src/ext/standard/array.c:1.266.2.14
--- php-src/ext/standard/array.c:1.266.2.13 Thu Feb 10 18:00:53 2005
+++ php-src/ext/standard/array.c Fri Feb 18 08:39:44 2005
@@ -21,7 +21,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: array.c,v 1.266.2.13 2005/02/10 23:00:53 rrichards Exp $ */
+/* $Id: array.c,v 1.266.2.14 2005/02/18 13:39:44 derick Exp $ */
#include "php.h"
#include "php_ini.h"
@@ -1559,7 +1559,7 @@
array_init(return_value);
/* If the range is given as strings, generate an array of characters. */
- if (Z_TYPE_P(zlow) == IS_STRING && Z_TYPE_P(zhigh) == IS_STRING) {
+ if (Z_TYPE_P(zlow) == IS_STRING && Z_TYPE_P(zhigh) == IS_STRING &&
Z_STRLEN_P(zlow) >= 1 && Z_STRLEN_P(zhigh) >= 1) {
int type1, type2;
unsigned char *low, *high;
long lstep = (long) step;
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1760.2.250&r2=1.1760.2.251&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1760.2.250 php-src/NEWS:1.1760.2.251
--- php-src/NEWS:1.1760.2.250 Fri Feb 18 06:48:10 2005
+++ php-src/NEWS Fri Feb 18 08:39:44 2005
@@ -16,6 +16,7 @@
is passed. (Tony)
- Fixed posix_getsid() & posix_getpgid() to return sid & pgid instead
of true. (Tony)
+- Fixed bug #32021 (Crash caused by range('', 'z')). (Derick)
- Fixed bug #32011 (Fragments which replaced Nodes are not globaly useable). (Rob)
- Fixed bug #31980 (Unicode exif data not available on Windows). (Edin)
- Fixed bug #31960 (msql_fetch_row() and msql_fetch_array() dropping columns
http://cvs.php.net/co.php/php-src/ext/standard/tests/array/bug32021.phpt?r=1.1&p=1
Index: php-src/ext/standard/tests/array/bug32021.phpt
+++ php-src/ext/standard/tests/array/bug32021.phpt
--TEST--
Bug #32021 (Crash caused by range('', 'z'))
--FILE--
<?php
$foo = range('', 'z');
var_dump($foo);
?>
ALIVE
--EXPECT--
array(1) {
[0]=>
int(0)
}
ALIVE