[PHP-CVS] svn: /php/php-src/branches/PHP_5_2/ext/mbstring/tests/ mb_strcut_missing_boundary_check.phpt

2010-11-08 Thread Moriyoshi Koizumi
moriyoshiTue, 09 Nov 2010 03:27:11 +

Revision: http://svn.php.net/viewvc?view=revision&revision=305215

Log:
- Remove duplicate portion.

Changed paths:
U   
php/php-src/branches/PHP_5_2/ext/mbstring/tests/mb_strcut_missing_boundary_check.phpt

Modified: 
php/php-src/branches/PHP_5_2/ext/mbstring/tests/mb_strcut_missing_boundary_check.phpt
===
--- 
php/php-src/branches/PHP_5_2/ext/mbstring/tests/mb_strcut_missing_boundary_check.phpt
   2010-11-09 03:23:04 UTC (rev 305214)
+++ 
php/php-src/branches/PHP_5_2/ext/mbstring/tests/mb_strcut_missing_boundary_check.phpt
   2010-11-09 03:27:11 UTC (rev 305215)
@@ -29,34 +29,3 @@
 string(12) "006100620063"
 string(6) "616263"
 string(6) "616263"
---TEST--
-mb_strcut() missing boundary check.
---SKIPIF--
-
---FILE--
--- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/ext/mbstring/tests/mb_strcut_missing_boundary_check.phpt branches/PHP_5_3/NEWS branches/PHP_5_3/ext/mbstring/libmbfl/mbfl/mbfilter.c branches/PHP_5_3/ext/

2010-11-08 Thread Moriyoshi Koizumi
moriyoshiTue, 09 Nov 2010 03:23:04 +

Revision: http://svn.php.net/viewvc?view=revision&revision=305214

Log:
- Fix bug #53273 (mb_strcut() returns garbage with the excessive length 
parameter).

Bug: http://bugs.php.net/53273 (Open) mb_strcut() returns garbage with the 
excessive length parameter
  
Changed paths:
A   
php/php-src/branches/PHP_5_2/ext/mbstring/tests/mb_strcut_missing_boundary_check.phpt
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/mbstring/libmbfl/mbfl/mbfilter.c
A   
php/php-src/branches/PHP_5_3/ext/mbstring/tests/mb_strcut_missing_boundary_check.phpt
U   php/php-src/trunk/ext/mbstring/libmbfl/mbfl/mbfilter.c
A   
php/php-src/trunk/ext/mbstring/tests/mb_strcut_missing_boundary_check.phpt

Added: 
php/php-src/branches/PHP_5_2/ext/mbstring/tests/mb_strcut_missing_boundary_check.phpt
===
--- 
php/php-src/branches/PHP_5_2/ext/mbstring/tests/mb_strcut_missing_boundary_check.phpt
   (rev 0)
+++ 
php/php-src/branches/PHP_5_2/ext/mbstring/tests/mb_strcut_missing_boundary_check.phpt
   2010-11-09 03:23:04 UTC (rev 305214)
@@ -0,0 +1,62 @@
+--TEST--
+mb_strcut() missing boundary check.
+--SKIPIF--
+
+--FILE--
+
+--FILE--
+val + from;
end   = start + (length & -4);
} else if ((encoding->flag & MBFL_ENCTYPE_SBCS)) {
+   if (from + length >= string->len) {
+   length = string->len - from;
+   }
+
start = string->val + from;
end = start + length;
} else if (encoding->mblen_table != NULL) {

Added: 
php/php-src/branches/PHP_5_3/ext/mbstring/tests/mb_strcut_missing_boundary_check.phpt
===
--- 
php/php-src/branches/PHP_5_3/ext/mbstring/tests/mb_strcut_missing_boundary_check.phpt
   (rev 0)
+++ 
php/php-src/branches/PHP_5_3/ext/mbstring/tests/mb_strcut_missing_boundary_check.phpt
   2010-11-09 03:23:04 UTC (rev 305214)
@@ -0,0 +1,31 @@
+--TEST--
+mb_strcut() missing boundary check.
+--SKIPIF--
+
+--FILE--
+val + from;
end   = start + (length & -4);
} else if ((encoding->flag & MBFL_ENCTYPE_SBCS)) {
+   if (from + length >= string->len) {
+   length = string->len - from;
+   }
+
start = string->val + from;
end = start + length;
} else if (encoding->mblen_table != NULL) {

Added: 
php/php-src/trunk/ext/mbstring/tests/mb_strcut_missing_boundary_check.phpt
===
--- php/php-src/trunk/ext/mbstring/tests/mb_strcut_missing_boundary_check.phpt  
(rev 0)
+++ php/php-src/trunk/ext/mbstring/tests/mb_strcut_missing_boundary_check.phpt  
2010-11-09 03:23:04 UTC (rev 305214)
@@ -0,0 +1,31 @@
+--TEST--
+mb_strcut() missing boundary check.
+--SKIPIF--
+
+--FILE--
+-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/spl/spl_iterators.c branches/PHP_5_3/ext/spl/tests/bug50579.phpt trunk/ext/spl/spl_iterators.c trunk/ext/spl/tests/bug50579.phpt

2010-11-08 Thread Felipe Pena
felipe   Mon, 08 Nov 2010 20:26:14 +

Revision: http://svn.php.net/viewvc?view=revision&revision=305211

Log:
- Fix the fix (wrong behavior)

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/spl/spl_iterators.c
U   php/php-src/branches/PHP_5_3/ext/spl/tests/bug50579.phpt
U   php/php-src/trunk/ext/spl/spl_iterators.c
U   php/php-src/trunk/ext/spl/tests/bug50579.phpt

Modified: php/php-src/branches/PHP_5_3/ext/spl/spl_iterators.c
===
--- php/php-src/branches/PHP_5_3/ext/spl/spl_iterators.c2010-11-08 
18:41:03 UTC (rev 305210)
+++ php/php-src/branches/PHP_5_3/ext/spl/spl_iterators.c2010-11-08 
20:26:14 UTC (rev 305211)
@@ -1796,7 +1796,7 @@
break;

case REGIT_MODE_REPLACE:
-   replacement = zend_read_property(intern->std.ce, 
intern->inner.zobject, "replacement", sizeof("replacement")-1, 1 TSRMLS_CC);
+   replacement = zend_read_property(intern->std.ce, getThis(), 
"replacement", sizeof("replacement")-1, 1 TSRMLS_CC);
result = php_pcre_replace_impl(intern->u.regex.pce, subject, 
subject_len, replacement, 0, &result_len, -1, &count TSRMLS_CC);

if (intern->u.regex.flags & REGIT_USE_KEY) {

Modified: php/php-src/branches/PHP_5_3/ext/spl/tests/bug50579.phpt
===
--- php/php-src/branches/PHP_5_3/ext/spl/tests/bug50579.phpt2010-11-08 
18:41:03 UTC (rev 305210)
+++ php/php-src/branches/PHP_5_3/ext/spl/tests/bug50579.phpt2010-11-08 
20:26:14 UTC (rev 305211)
@@ -9,23 +9,23 @@
'test1'=>'test888',
'test2'=>'what?',
'test3'=>'test999'));
-   $this->replacement = '[$1]';
}
 }
 $h = new foo;
 $i = new RegexIterator($h, '/^test(.*)/', RegexIterator::REPLACE);
-$h->replacement = '[$0]';
+$i->replacement = '[$0]';
 foreach ($i as $name=>$value) {
echo $name . '=>' . $value . "\n";
 }

-$h->replacement = '$1';
+$i->replacement = '$1';
 foreach ($i as $name=>$value) {
echo $name . '=>' . $value . "\n";
 }

 $h = new foo;
 $i = new RegexIterator($h, '/^test(.*)/', RegexIterator::REPLACE);
+$i->replacement = '[$1]';
 foreach ($i as $name=>$value) {
echo $name . '=>' . $value . "\n";
 }

Modified: php/php-src/trunk/ext/spl/spl_iterators.c
===
--- php/php-src/trunk/ext/spl/spl_iterators.c   2010-11-08 18:41:03 UTC (rev 
305210)
+++ php/php-src/trunk/ext/spl/spl_iterators.c   2010-11-08 20:26:14 UTC (rev 
305211)
@@ -1795,7 +1795,7 @@
break;

case REGIT_MODE_REPLACE:
-   replacement = zend_read_property(intern->std.ce, 
intern->inner.zobject, "replacement", sizeof("replacement")-1, 1 TSRMLS_CC);
+   replacement = zend_read_property(intern->std.ce, getThis(), 
"replacement", sizeof("replacement")-1, 1 TSRMLS_CC);
result = php_pcre_replace_impl(intern->u.regex.pce, subject, 
subject_len, replacement, 0, &result_len, -1, &count TSRMLS_CC);

if (intern->u.regex.flags & REGIT_USE_KEY) {

Modified: php/php-src/trunk/ext/spl/tests/bug50579.phpt
===
--- php/php-src/trunk/ext/spl/tests/bug50579.phpt   2010-11-08 18:41:03 UTC 
(rev 305210)
+++ php/php-src/trunk/ext/spl/tests/bug50579.phpt   2010-11-08 20:26:14 UTC 
(rev 305211)
@@ -9,23 +9,23 @@
'test1'=>'test888',
'test2'=>'what?',
'test3'=>'test999'));
-   $this->replacement = '[$1]';
}
 }
 $h = new foo;
 $i = new RegexIterator($h, '/^test(.*)/', RegexIterator::REPLACE);
-$h->replacement = '[$0]';
+$i->replacement = '[$0]';
 foreach ($i as $name=>$value) {
echo $name . '=>' . $value . "\n";
 }

-$h->replacement = '$1';
+$i->replacement = '$1';
 foreach ($i as $name=>$value) {
echo $name . '=>' . $value . "\n";
 }

 $h = new foo;
 $i = new RegexIterator($h, '/^test(.*)/', RegexIterator::REPLACE);
+$i->replacement = '[$1]';
 foreach ($i as $name=>$value) {
echo $name . '=>' . $value . "\n";
 }

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/ext/soap/php_sdl.c branches/PHP_5_3/ext/soap/php_sdl.c trunk/ext/soap/php_sdl.c

2010-11-08 Thread Dmitry Stogov
dmitry   Mon, 08 Nov 2010 11:34:32 +

Revision: http://svn.php.net/viewvc?view=revision&revision=305198

Log:
Fixed WSDL loading using https through proxy

Changed paths:
U   php/php-src/branches/PHP_5_2/ext/soap/php_sdl.c
U   php/php-src/branches/PHP_5_3/ext/soap/php_sdl.c
U   php/php-src/trunk/ext/soap/php_sdl.c

Modified: php/php-src/branches/PHP_5_2/ext/soap/php_sdl.c
===
--- php/php-src/branches/PHP_5_2/ext/soap/php_sdl.c 2010-11-08 10:38:19 UTC 
(rev 305197)
+++ php/php-src/branches/PHP_5_2/ext/soap/php_sdl.c 2010-11-08 11:34:32 UTC 
(rev 305198)
@@ -3239,10 +3239,13 @@
php_stream_context_set_option(context, "http", "proxy", 
str_proxy);
zval_ptr_dtor(&str_proxy);

-   MAKE_STD_ZVAL(str_proxy);
-   ZVAL_BOOL(str_proxy, 1);
-   php_stream_context_set_option(context, "http", 
"request_fulluri", str_proxy);
-   zval_ptr_dtor(&str_proxy);
+   if (uri_len < sizeof("https://";)-1 ||
+   strncasecmp(uri, "https://";, sizeof("https://";)-1) != 0) {
+   MAKE_STD_ZVAL(str_proxy);
+   ZVAL_BOOL(str_proxy, 1);
+   php_stream_context_set_option(context, "http", 
"request_fulluri", str_proxy);
+   zval_ptr_dtor(&str_proxy);
+   }

proxy_authentication(this_ptr, &headers TSRMLS_CC);
}

Modified: php/php-src/branches/PHP_5_3/ext/soap/php_sdl.c
===
--- php/php-src/branches/PHP_5_3/ext/soap/php_sdl.c 2010-11-08 10:38:19 UTC 
(rev 305197)
+++ php/php-src/branches/PHP_5_3/ext/soap/php_sdl.c 2010-11-08 11:34:32 UTC 
(rev 305198)
@@ -3250,10 +3250,13 @@
php_stream_context_set_option(context, "http", "proxy", 
str_proxy);
zval_ptr_dtor(&str_proxy);

-   MAKE_STD_ZVAL(str_proxy);
-   ZVAL_BOOL(str_proxy, 1);
-   php_stream_context_set_option(context, "http", 
"request_fulluri", str_proxy);
-   zval_ptr_dtor(&str_proxy);
+   if (uri_len < sizeof("https://";)-1 ||
+   strncasecmp(uri, "https://";, sizeof("https://";)-1) != 0) {
+   MAKE_STD_ZVAL(str_proxy);
+   ZVAL_BOOL(str_proxy, 1);
+   php_stream_context_set_option(context, "http", 
"request_fulluri", str_proxy);
+   zval_ptr_dtor(&str_proxy);
+   }

proxy_authentication(this_ptr, &headers TSRMLS_CC);
}

Modified: php/php-src/trunk/ext/soap/php_sdl.c
===
--- php/php-src/trunk/ext/soap/php_sdl.c2010-11-08 10:38:19 UTC (rev 
305197)
+++ php/php-src/trunk/ext/soap/php_sdl.c2010-11-08 11:34:32 UTC (rev 
305198)
@@ -3250,10 +3250,13 @@
php_stream_context_set_option(context, "http", "proxy", 
str_proxy);
zval_ptr_dtor(&str_proxy);

-   MAKE_STD_ZVAL(str_proxy);
-   ZVAL_BOOL(str_proxy, 1);
-   php_stream_context_set_option(context, "http", 
"request_fulluri", str_proxy);
-   zval_ptr_dtor(&str_proxy);
+   if (uri_len < sizeof("https://";)-1 ||
+   strncasecmp(uri, "https://";, sizeof("https://";)-1) != 0) {
+   MAKE_STD_ZVAL(str_proxy);
+   ZVAL_BOOL(str_proxy, 1);
+   php_stream_context_set_option(context, "http", 
"request_fulluri", str_proxy);
+   zval_ptr_dtor(&str_proxy);
+   }

proxy_authentication(this_ptr, &headers TSRMLS_CC);
}

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/trunk/ NEWS ext/hash/hash_adler32.c

2010-11-08 Thread Adam Harvey
aharvey  Mon, 08 Nov 2010 09:35:33 +

Revision: http://svn.php.net/viewvc?view=revision&revision=305193

Log:
Implemented FR #53213 (Adler32 algorithm is very slow). Patch by zavasek at
yandex dot ru.

Bug: http://bugs.php.net/53213 (error getting bug information)
  
Changed paths:
U   php/php-src/trunk/NEWS
U   php/php-src/trunk/ext/hash/hash_adler32.c

Modified: php/php-src/trunk/NEWS
===
--- php/php-src/trunk/NEWS  2010-11-08 09:29:15 UTC (rev 305192)
+++ php/php-src/trunk/NEWS  2010-11-08 09:35:33 UTC (rev 305193)
@@ -124,6 +124,8 @@

 - Implemented FR #53238 (Make third parameter of preg_match_all optional).
   (Adam)
+- Implemented FR #53213 (Adler32 algorithm is very slow).
+  (zavasek at yandex dot ru)
 - Implemented FR #52555 (Ability to get HTTP response code). (Paul Dragoonis)
 - Implemented FR #51295 (SQLite3::busyTimeout not existing). (Mark)
 - Implemented FR #49366 (Make slash escaping optional in json_encode()). (Adam)

Modified: php/php-src/trunk/ext/hash/hash_adler32.c
===
--- php/php-src/trunk/ext/hash/hash_adler32.c   2010-11-08 09:29:15 UTC (rev 
305192)
+++ php/php-src/trunk/ext/hash/hash_adler32.c   2010-11-08 09:35:33 UTC (rev 
305193)
@@ -34,9 +34,16 @@
s[0] = context->state & 0x;
s[1] = (context->state >> 16) & 0x;
for (i = 0; i < len; ++i) {
-   s[0] = (s[0] + input[i]) % 65521;
-   s[1] = (s[1] + s[0]) % 65521;
+   s[0] += input[i];
+   s[1] += s[0];
+   if (s[1]>=0x7fff)
+   {
+   s[0] = s[0] % 65521;
+   s[1] = s[1] % 65521;
+   }
}
+   s[0] = s[0] % 65521;
+   s[1] = s[1] % 65521;
context->state = s[0] + (s[1] << 16);
 }


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/ext/iconv/tests/iconv_stream_filter_delimiter.phpt branches/PHP_5_2/ext/mbstring/tests/bug43301.phpt branches/PHP_5_2/ext/pdo/tests/pdo_034.phpt branches/

2010-11-08 Thread Patrick Allaert
patrickallaert   Mon, 08 Nov 2010 09:29:15 +

Revision: http://svn.php.net/viewvc?view=revision&revision=305192

Log:
- Fixed tests not passing under windows because of the directory separator
difference (thanks Eyal Teutsch for reporting)

Changed paths:
U   
php/php-src/branches/PHP_5_2/ext/iconv/tests/iconv_stream_filter_delimiter.phpt
U   php/php-src/branches/PHP_5_2/ext/mbstring/tests/bug43301.phpt
U   php/php-src/branches/PHP_5_2/ext/pdo/tests/pdo_034.phpt
U   php/php-src/branches/PHP_5_2/ext/pdo_pgsql/tests/bug36727.phpt
U   php/php-src/branches/PHP_5_2/ext/reflection/tests/bug42976.phpt
U   
php/php-src/branches/PHP_5_2/ext/standard/tests/file/copy_variation12.phpt
U   php/php-src/branches/PHP_5_2/ext/sysvshm/tests/002.phpt
U   
php/php-src/branches/PHP_5_3/ext/iconv/tests/iconv_stream_filter_delimiter.phpt
U   php/php-src/branches/PHP_5_3/ext/mbstring/tests/bug43301.phpt
U   php/php-src/branches/PHP_5_3/ext/pdo_pgsql/tests/bug36727.phpt
U   
php/php-src/branches/PHP_5_3/ext/sqlite3/tests/sqlite3_15_open_error.phpt
U   
php/php-src/branches/PHP_5_3/ext/standard/tests/file/copy_variation12.phpt
U   php/php-src/branches/PHP_5_3/tests/basic/bug51709_1.phpt
U   php/php-src/branches/PHP_5_3/tests/basic/bug51709_2.phpt
U   php/php-src/trunk/ext/iconv/tests/iconv_stream_filter_delimiter.phpt
U   php/php-src/trunk/ext/mbstring/tests/bug43301.phpt
U   php/php-src/trunk/ext/pdo_pgsql/tests/bug36727.phpt
U   php/php-src/trunk/ext/sqlite3/tests/sqlite3_15_open_error.phpt
U   php/php-src/trunk/ext/standard/tests/file/copy_variation12.phpt
U   php/php-src/trunk/tests/basic/bug51709_1.phpt
U   php/php-src/trunk/tests/basic/bug51709_2.phpt

Modified: php/php-src/branches/PHP_5_2/ext/iconv/tests/iconv_stream_filter_delimiter.phpt
===
--- php/php-src/branches/PHP_5_2/ext/iconv/tests/iconv_stream_filter_delimiter.phpt	2010-11-08 09:14:48 UTC (rev 305191)
+++ php/php-src/branches/PHP_5_2/ext/iconv/tests/iconv_stream_filter_delimiter.phpt	2010-11-08 09:29:15 UTC (rev 305192)
@@ -41,12 +41,12 @@
 string(10) "69636f6e76"
 string(2) "0a"

-Warning: stream_filter_append(): unable to create or locate filter "convert.iconv.ISO-2022-JP.EUC-JP" in %s/iconv_stream_filter_delimiter.php on line %d
+Warning: stream_filter_append(): unable to create or locate filter "convert.iconv.ISO-2022-JP.EUC-JP" in %siconv_stream_filter_delimiter.php on line %d
 string(20) "1b244224332473244b24"
 string(10) "41244f1b28"
 string(2) "42"

-Warning: stream_filter_append(): unable to create or locate filter "convert.iconv.ISO-2022-JP\0EUC-JP" in %s/iconv_stream_filter_delimiter.php on line %d
+Warning: stream_filter_append(): unable to create or locate filter "convert.iconv.ISO-2022-JP\0EUC-JP" in %siconv_stream_filter_delimiter.php on line %d
 string(20) "1b244224332473244b24"
 string(10) "41244f1b28"
 string(2) "42"

Modified: php/php-src/branches/PHP_5_2/ext/mbstring/tests/bug43301.phpt
===
--- php/php-src/branches/PHP_5_2/ext/mbstring/tests/bug43301.phpt	2010-11-08 09:14:48 UTC (rev 305191)
+++ php/php-src/branches/PHP_5_2/ext/mbstring/tests/bug43301.phpt	2010-11-08 09:29:15 UTC (rev 305192)
@@ -14,7 +14,7 @@
 echo mb_ereg_replace($ptr,'$1',$txt,'e');
 ?>
 --EXPECTF--
-Parse error: syntax error, unexpected T_LNUMBER, expecting T_VARIABLE or '$' in %s/bug43301.php(%d) : mbregex replace on line 1
+Parse error: syntax error, unexpected T_LNUMBER, expecting T_VARIABLE or '$' in %sbug43301.php(%d) : mbregex replace on line 1

 Fatal error: mb_ereg_replace(): Failed evaluating code:
-$1 in %s/bug43301.php on line %d
+$1 in %sbug43301.php on line %d

Modified: php/php-src/branches/PHP_5_2/ext/pdo/tests/pdo_034.phpt
===
--- php/php-src/branches/PHP_5_2/ext/pdo/tests/pdo_034.phpt	2010-11-08 09:14:48 UTC (rev 305191)
+++ php/php-src/branches/PHP_5_2/ext/pdo/tests/pdo_034.phpt	2010-11-08 09:29:15 UTC (rev 305192)
@@ -44,9 +44,9 @@
   string(1) "4"
 }

-Warning: PDOStatement::fetch(): SQLSTATE[HY000]: General error: PDO::FETCH_KEY_PAIR fetch mode requires the result set to contain extactly 2 columns. in %s/pdo_034.php on line %d
+Warning: PDOStatement::fetch(): SQLSTATE[HY000]: General error: PDO::FETCH_KEY_PAIR fetch mode requires the result set to contain extactly 2 columns. in %spdo_034.php on line %d

-Warning: PDOStatement::fetch(): SQLSTATE[HY000]: General error%s/pdo_034.php on line %d
+Warning: PDOStatement::fetch(): SQLSTATE[HY000]: General error%spdo_034.php on line %d
 bool(false)
 array(5) {
   ["test0"]=>

Modified: php/php-src/branches/PHP_5_2/ext/pdo_pgsql/tests/bug36727.phpt
===
--- php/php-src/branches/PHP_5_2/ext/pdo_pgsql/tests/bug36727.phpt	2010-11-08 09:14:48 UTC (rev 30519

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/tests/security/bug53226.phpt trunk/tests/security/bug53226.phpt

2010-11-08 Thread Adam Harvey
aharvey  Mon, 08 Nov 2010 09:14:48 +

Revision: http://svn.php.net/viewvc?view=revision&revision=305191

Log:
Update the tests committed in r305098 (as part of the fix for bug #53226) to
use the PHP_MAXPATHLEN constant, as recommended by Pierre.

Bug: http://bugs.php.net/53226 (error getting bug information)
  
Changed paths:
U   php/php-src/branches/PHP_5_3/tests/security/bug53226.phpt
U   php/php-src/trunk/tests/security/bug53226.phpt

Modified: php/php-src/branches/PHP_5_3/tests/security/bug53226.phpt
===
--- php/php-src/branches/PHP_5_3/tests/security/bug53226.phpt   2010-11-08 
06:35:14 UTC (rev 305190)
+++ php/php-src/branches/PHP_5_3/tests/security/bug53226.phpt   2010-11-08 
09:14:48 UTC (rev 305191)
@@ -10,9 +10,7 @@
 var_dump(file_exists('./test/ok/ok.txt'));
 var_dump(file_exists('./test/foo'));

-// Picked an arbitrarily large number that should be beyond PATH_MAX on every
-// OS I know about.
-$file = str_repeat('x', 4);
+$file = str_repeat('x', 2 * PHP_MAXPATHLEN);
 var_dump(file_exists("./test/$file"));
 ?>
 --CLEAN--

Modified: php/php-src/trunk/tests/security/bug53226.phpt
===
--- php/php-src/trunk/tests/security/bug53226.phpt  2010-11-08 06:35:14 UTC 
(rev 305190)
+++ php/php-src/trunk/tests/security/bug53226.phpt  2010-11-08 09:14:48 UTC 
(rev 305191)
@@ -10,9 +10,7 @@
 var_dump(file_exists('./test/ok/ok.txt'));
 var_dump(file_exists('./test/foo'));

-// Picked an arbitrarily large number that should be beyond PATH_MAX on every
-// OS I know about.
-$file = str_repeat('x', 4);
+$file = str_repeat('x', 2 * PHP_MAXPATHLEN);
 var_dump(file_exists("./test/$file"));
 ?>
 --CLEAN--

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php