[PHP-CVS] com php-src: Fix build on MS Windows: ext/standard/pack.c

2012-04-28 Thread Gustavo Andreacute; dos Santos Lopes
Commit:ffec6144123b3d4fdd40be1d8d130f60cb2594d2
Author:Gustavo André dos Santos Lopes cataphr...@php.net Sat, 28 
Apr 2012 16:32:44 +0100
Parents:   a1f7423087c85ecd48a034d4a95a2bf19901f13d
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=ffec6144123b3d4fdd40be1d8d130f60cb2594d2

Log:
Fix build on MS Windows

Changed paths:
  M  ext/standard/pack.c


Diff:
diff --git a/ext/standard/pack.c b/ext/standard/pack.c
index a21d41b..61228a6 100644
--- a/ext/standard/pack.c
+++ b/ext/standard/pack.c
@@ -719,7 +719,8 @@ PHP_FUNCTION(unpack)
case 'Z': {
/* Z will strip everything 
after the first null character */
char pad = '\0';
-   int len = inputlen - inputpos;  
/* Remaining string */
+   int  s,
+len = inputlen - 
inputpos; /* Remaining string */
 
/* If size was given take 
minimum of len and size */
if ((size = 0)  (len  
size)) {
@@ -729,7 +730,7 @@ PHP_FUNCTION(unpack)
size = len;
 
/* Remove everything after the 
first null */
-   int s = 0;
+   s = 0;
while (s++ = len) {
if (input[inputpos + s] 
== pad)
break;


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



[PHP-CVS] com php-src: Merge branch '5.3' into 5.4: ext/standard/pack.c

2012-04-23 Thread Gustavo Andreacute; dos Santos Lopes
Commit:485638a09c23e48820e0160c26098b0ef571c533
Author:Gustavo André dos Santos Lopes cataphr...@php.net Mon, 23 
Apr 2012 22:10:23 +0100
Parents:   883d40667d1e71b923aa05b7a4fffc8d98ab9b5e 
8d748e5de519867d9b6ce40e3ea28a209b07768f
Branches:  PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=485638a09c23e48820e0160c26098b0ef571c533

Log:
Merge branch '5.3' into 5.4

Changed paths:
  MM  ext/standard/pack.c


Diff:



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



[PHP-CVS] com php-src: Fixed bug #61764: 'I' unpacks n as signed if n 2^31-1 on LP64: NEWS ext/standard/pack.c ext/standard/tests/strings/bug38770.phpt ext/standard/tests/strings/bug61764.phpt

2012-04-23 Thread Gustavo Andreacute; dos Santos Lopes
Commit:8d748e5de519867d9b6ce40e3ea28a209b07768f
Author:Gustavo André dos Santos Lopes cataphr...@php.net Mon, 23 
Apr 2012 22:09:38 +0100
Parents:   c8865e3b84c9a3d08811b3b8f954defcd8fb621d
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=8d748e5de519867d9b6ce40e3ea28a209b07768f

Log:
Fixed bug #61764: 'I' unpacks n as signed if n  2^31-1 on LP64

Also fixed possible invalid read on big endian LP64.

Bugs:
https://bugs.php.net/61764

Changed paths:
  M  NEWS
  M  ext/standard/pack.c
  M  ext/standard/tests/strings/bug38770.phpt
  A  ext/standard/tests/strings/bug61764.phpt


Diff:
diff --git a/NEWS b/NEWS
index a483909..b8193c9 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,7 @@ PHP 
   NEWS
 ?? ??? 2012, PHP 5.3.12
 
 - Core:
+  . Fixed bug #61764 ('I' unpacks n as signed if n  2^31-1 on LP64). (Gustavo)
   . Fixed bug #54197 ([PATH=] sections incompatibility with user_ini.filename
set to null). (Anatoliy)
 
diff --git a/ext/standard/pack.c b/ext/standard/pack.c
index 5ad1ecf..5d3c8a8 100644
--- a/ext/standard/pack.c
+++ b/ext/standard/pack.c
@@ -759,16 +759,14 @@ PHP_FUNCTION(unpack)
 
case 'i': 
case 'I': {
-   long v = 0;
+   long v;
int issigned = 0;
 
if (type == 'i') {
issigned = 
input[inputpos + (machine_little_endian ? (sizeof(int) - 1) : 0)]  0x80;
-   } else if (sizeof(long)  4  
(input[inputpos + machine_endian_long_map[3]]  0x80) == 0x80) {
-   v = ~INT_MAX;
}
 
-   v |= 
php_unpack(input[inputpos], sizeof(int), issigned, int_map);
+   v = 
php_unpack(input[inputpos], sizeof(int), issigned, int_map);
add_assoc_long(return_value, n, 
v);
break;
}
diff --git a/ext/standard/tests/strings/bug38770.phpt 
b/ext/standard/tests/strings/bug38770.phpt
index 417794c..1821639 100644
--- a/ext/standard/tests/strings/bug38770.phpt
+++ b/ext/standard/tests/strings/bug38770.phpt
@@ -7,7 +7,7 @@ if (PHP_INT_SIZE != 8) die(skip this test is for 64bit 
platform only);
 --FILE--
 ?php
 
-foreach (array('N','I','l') as $v) {
+foreach (array('N','l') as $v) {
print_r(unpack($v, pack($v, -3)));
 }
 
@@ -22,8 +22,4 @@ Array
 (
 [1] = -3
 )
-Array
-(
-[1] = -3
-)
 Done
diff --git a/ext/standard/tests/strings/bug61764.phpt 
b/ext/standard/tests/strings/bug61764.phpt
new file mode 100644
index 000..dc44f25
--- /dev/null
+++ b/ext/standard/tests/strings/bug61764.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Bug #61764: 'I' unpacks n as signed if n  2^31-1 on LP64
+--SKIPIF--
+?php
+if (PHP_INT_SIZE != 8) die(skip this test is for 64bit platform only);
+--FILE--
+?php
+//expected -3 mod 2^32 = 4294937296, and not -3
+//because we can represent 4294937296 with our PHP int type
+print_r(unpack('I', pack('L', -3)));
+--EXPECT--
+Array
+(
+[1] = 4294937296
+)


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



[PHP-CVS] com php-src: Merge branch '5.4': ext/standard/pack.c

2012-04-23 Thread Gustavo Andreacute; dos Santos Lopes
Commit:d77cde46e138b41c944807545489e82c4ac12b8d
Author:Gustavo André dos Santos Lopes cataphr...@php.net Mon, 23 
Apr 2012 22:10:50 +0100
Parents:   93d42fb444cbcd3850afd3db028319b8d4c30f10 
485638a09c23e48820e0160c26098b0ef571c533
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=d77cde46e138b41c944807545489e82c4ac12b8d

Log:
Merge branch '5.4'

Changed paths:
  MM  ext/standard/pack.c


Diff:



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



[PHP-CVS] com php-src: Merge .gitattributes EOL commit from 5.3.: .gitattributes

2012-04-10 Thread Gustavo Andreacute; dos Santos Lopes
Commit:112a476b683a634390b23fe7509d5b73632d0829
Author:Gustavo André dos Santos Lopes cataphr...@php.net Tue, 10 
Apr 2012 19:41:33 +0100
Parents:   9ada49fa1c957645e2bd4a7d58f2fb49a8f834e7 
1c8fccdf6d6d04d8e6a5dedd7c9d6b1afda8839f
Branches:  PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=112a476b683a634390b23fe7509d5b73632d0829

Log:
Merge .gitattributes EOL commit from 5.3.

This merge commit includes several changes from the 5.3 commit.
This is because of 1) different tests between the two branches
and 2) the svn:eol-style attributes differing between the two
branches.

Changed paths:
  MM  .gitattributes

diff --cc .gitattributes
index 5570b4b,d53e569..1f4a719
--- a/.gitattributes
+++ b/.gitattributes
@@@ -22,3 -22,152 +22,153 @@@ sapi/continuity/capi.c  iden
  Zend/RFCs/002.txt   ident
  Zend/RFCs/003.txt   ident
  NEWSmerge=NEWS
 -/ext/bz2/tests/005.phpt   -crlf
 -/ext/dom/tests/dom005.phpt-crlf
 -/ext/dom/tests/DOMImplementation_createDocumentType_basic.phpt-crlf
 -/ext/ereg/tests/009.phpt  -crlf
 -/ext/iconv/tests/eucjp2sjis.phpt  -crlf
 -/ext/iconv/tests/eucjp2utf8.phpt  -crlf
 -/ext/iconv/tests/iconv_stream_filter_delimiter.phpt   -crlf
 -/ext/iconv/tests/iconv_stream_filter.phpt -crlf
 -/ext/mbstring/tests/mb_split-compat-01.phpt   -crlf
 -/ext/phar/tests/005.phpt  -crlf
 -/ext/phar/tests/phar_commitwrite.phpt -crlf
 -/ext/phar/tests/phar_create_in_cwd.phpt   -crlf
 -/ext/phar/tests/phar_mount.phpt   -crlf
 -/ext/reflection/tests/009.phpt-crlf
 -/ext/reflection/tests/025.phpt-crlf
 -/ext/standard/tests/general_functions/highlight_heredoc.phpt  -crlf
 -/ext/standard/tests/general_functions/parse_ini_file.phpt -crlf
 -/ext/standard/tests/general_functions/parse_ini_string_002.phpt   -crlf
 -/ext/standard/tests/strings/006.phpt  -crlf
 -/ext/standard/tests/strings/addslashes_variation2.phpt-crlf
 -/ext/standard/tests/strings/addslashes_variation3.phpt-crlf
 -/ext/standard/tests/strings/bug21453.phpt -crlf
 -/ext/standard/tests/strings/chop_variation3.phpt  -crlf
 -/ext/standard/tests/strings/chunk_split_variation11.phpt  -crlf
 -/ext/standard/tests/strings/chunk_split_variation12.phpt  -crlf
 -/ext/standard/tests/strings/chunk_split_variation4.phpt   -crlf
 -/ext/standard/tests/strings/crc32_variation2.phpt -crlf
 -/ext/standard/tests/strings/crc32_variation3.phpt -crlf
 -/ext/standard/tests/strings/crc32_variation4.phpt -crlf
++/ext/bz2/tests/with_strings.phpt  -crlf
++/ext/dom/tests/bug40836.phpt  -crlf
++/ext/dom/tests/domelement.phpt-crlf
++/ext/ereg/tests/eregi_basic_002.phpt  -crlf
++/ext/iconv/tests/iconv004.phpt-crlf
++/ext/iconv/tests/iconv_basic.phpt -crlf
++/ext/iconv/tests/iconv_strpos.phpt-crlf
++/ext/iconv/tests/iconv_strpos_variation2.phpt -crlf
++/ext/mbstring/tests/mb_strtoupper_error2.phpt -crlf
++/ext/phar/tests/delete_in_phar_confirm.phpt   -crlf
++/ext/phar/tests/frontcontroller12.phpt-crlf
++/ext/phar/tests/security.phpt -crlf
++/ext/phar/tests/test_signaturealgos.phpt  -crlf
++/ext/reflection/tests/ReflectionMethod_invokeArgs_basic.phpt  -crlf
++/ext/reflection/tests/ReflectionProperty_getModifiers_basic.phpt  -crlf
++/ext/spl/tests/dllist_007.phpt-crlf
++/ext/spl/tests/iterator_012.phpt  -crlf
++/ext/spl/tests/SplArray_fromArray.phpt-crlf
++/ext/standard/tests/dir/scandir_variation3.phpt   -crlf
++/ext/standard/tests/general_functions/escapeshellcmd-win32.phpt   -crlf
++/ext/standard/tests/general_functions/set_magic_quotes_runtime_error.phpt 
-crlf
++/ext/standard/tests/strings/bug26817.phpt -crlf
++/ext/standard/tests/strings/bug26973.phpt -crlf
++/ext/standard/tests/strings/bug27457.phpt -crlf
++/ext/standard/tests/strings/bug28386.phpt -crlf
++/ext/standard/tests/strings/bug37262.phpt -crlf
++/ext/standard/tests/strings/bug40637.phpt -crlf
++/ext/standard/tests/strings/bug40915.phpt -crlf
++/ext/standard/tests/strings/bug61374.phpt -crlf
++/ext/standard/tests/strings/chop_error.phpt   -crlf
++/ext/standard/tests/strings/chop_variation2.phpt  -crlf
++/ext/standard/tests/strings/chunk_split_variation10.phpt  -crlf
++/ext/standard/tests/strings/chunk_split_variation8.phpt   -crlf
++/ext/standard/tests/strings/count_chars_variation2.phpt   -crlf
++/ext/standard/tests/strings/dirname_error.phpt-crlf
++/ext/standard/tests/strings/fprintf_variation_007_64bit.phpt  -crlf
+ /ext/standard/tests/strings/highlight_file.phpt   -crlf
 -/ext/standard/tests/strings/htmlentities_html4.phpt   -crlf
 -/ext/standard/tests/strings/lcfirst.phpt  -crlf
 -/ext/standard/tests/strings/ltrim.phpt-crlf
 -/ext/standard/tests/strings/nl2br_variation2.phpt -crlf
 -/ext/standard/tests/strings/php_strip_whitespace.phpt -crlf

[PHP-CVS] com php-src: Disabled EOL conversions on certain tests: .gitattributes

2012-04-10 Thread Gustavo Andreacute; dos Santos Lopes
Commit:1c8fccdf6d6d04d8e6a5dedd7c9d6b1afda8839f
Author:Gustavo André dos Santos Lopes cataphr...@php.net Tue, 10 
Apr 2012 19:41:07 +0100
Parents:   ed0ddd20c50d9b9c9e0b914194a66f91028074a2
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=1c8fccdf6d6d04d8e6a5dedd7c9d6b1afda8839f

Log:
Disabled EOL conversions on certain tests

Changed paths:
  M  .gitattributes

diff --git a/.gitattributes b/.gitattributes
index 5570b4b..d53e569 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -22,3 +22,152 @@ sapi/continuity/capi.c  ident
 Zend/RFCs/002.txt   ident
 Zend/RFCs/003.txt   ident
 NEWSmerge=NEWS
+/ext/bz2/tests/005.phpt-crlf
+/ext/dom/tests/dom005.phpt -crlf
+/ext/dom/tests/DOMImplementation_createDocumentType_basic.phpt -crlf
+/ext/ereg/tests/009.phpt   -crlf
+/ext/iconv/tests/eucjp2sjis.phpt   -crlf
+/ext/iconv/tests/eucjp2utf8.phpt   -crlf
+/ext/iconv/tests/iconv_stream_filter_delimiter.phpt-crlf
+/ext/iconv/tests/iconv_stream_filter.phpt  -crlf
+/ext/mbstring/tests/mb_split-compat-01.phpt-crlf
+/ext/phar/tests/005.phpt   -crlf
+/ext/phar/tests/phar_commitwrite.phpt  -crlf
+/ext/phar/tests/phar_create_in_cwd.phpt-crlf
+/ext/phar/tests/phar_mount.phpt-crlf
+/ext/reflection/tests/009.phpt -crlf
+/ext/reflection/tests/025.phpt -crlf
+/ext/standard/tests/general_functions/highlight_heredoc.phpt   -crlf
+/ext/standard/tests/general_functions/parse_ini_file.phpt  -crlf
+/ext/standard/tests/general_functions/parse_ini_string_002.phpt-crlf
+/ext/standard/tests/strings/006.phpt   -crlf
+/ext/standard/tests/strings/addslashes_variation2.phpt -crlf
+/ext/standard/tests/strings/addslashes_variation3.phpt -crlf
+/ext/standard/tests/strings/bug21453.phpt  -crlf
+/ext/standard/tests/strings/chop_variation3.phpt   -crlf
+/ext/standard/tests/strings/chunk_split_variation11.phpt   -crlf
+/ext/standard/tests/strings/chunk_split_variation12.phpt   -crlf
+/ext/standard/tests/strings/chunk_split_variation4.phpt-crlf
+/ext/standard/tests/strings/crc32_variation2.phpt  -crlf
+/ext/standard/tests/strings/crc32_variation3.phpt  -crlf
+/ext/standard/tests/strings/crc32_variation4.phpt  -crlf
+/ext/standard/tests/strings/highlight_file.phpt-crlf
+/ext/standard/tests/strings/htmlentities_html4.phpt-crlf
+/ext/standard/tests/strings/lcfirst.phpt   -crlf
+/ext/standard/tests/strings/ltrim.phpt -crlf
+/ext/standard/tests/strings/nl2br_variation2.phpt  -crlf
+/ext/standard/tests/strings/php_strip_whitespace.phpt  -crlf
+/ext/standard/tests/strings/rtrim.phpt -crlf
+/ext/standard/tests/strings/sprintf_f_2.phpt   -crlf
+/ext/standard/tests/strings/sprintf_variation15.phpt   -crlf
+/ext/standard/tests/strings/strcspn_variation6.phpt-crlf
+/ext/standard/tests/strings/strcspn_variation7.phpt-crlf
+/ext/standard/tests/strings/strcspn_variation8.phpt-crlf
+/ext/standard/tests/strings/stripos_variation1.phpt-crlf
+/ext/standard/tests/strings/stripos_variation3.phpt-crlf
+/ext/standard/tests/strings/stripos_variation4.phpt-crlf
+/ext/standard/tests/strings/stripos_variation5.phpt-crlf
+/ext/standard/tests/strings/stripos_variation6.phpt-crlf
+/ext/standard/tests/strings/stripslashes_variation2.phpt   -crlf
+/ext/standard/tests/strings/stripslashes_variation3.phpt   -crlf
+/ext/standard/tests/strings/stripslashes_variation4.phpt   -crlf
+/ext/standard/tests/strings/stripslashes_variation5.phpt   -crlf
+/ext/standard/tests/strings/str_ireplace.phpt  -crlf
+/ext/standard/tests/strings/strnatcmp_basic.phpt   -crlf
+/ext/standard/tests/strings/strncasecmp_variation9.phpt-crlf
+/ext/standard/tests/strings/strpos.phpt-crlf
+/ext/standard/tests/strings/strrchr_variation1.phpt-crlf
+/ext/standard/tests/strings/strrchr_variation2.phpt-crlf
+/ext/standard/tests/strings/strrchr_variation3.phpt-crlf
+/ext/standard/tests/strings/strrchr_variation4.phpt-crlf
+/ext/standard/tests/strings/strrchr_variation6.phpt-crlf
+/ext/standard/tests/strings/strrchr_variation7.phpt-crlf
+/ext/standard/tests/strings/str_replace.phpt   -crlf
+/ext/standard/tests/strings/strrev_variation3.phpt -crlf
+/ext/standard/tests/strings/strrev_variation4.phpt -crlf
+/ext/standard/tests/strings/strripos_variation1.phpt   -crlf
+/ext/standard/tests/strings/strripos_variation2.phpt   -crlf
+/ext/standard/tests/strings/strripos_variation3.phpt   -crlf
+/ext/standard/tests/strings/strripos_variation4.phpt   -crlf
+/ext/standard/tests/strings/strripos_variation5.phpt   -crlf
+/ext/standard/tests/strings/strrpos_variation1.phpt-crlf
+/ext/standard/tests/strings/strrpos_variation2.phpt-crlf
+/ext/standard/tests/strings/strrpos_variation3.phpt-crlf
+/ext/standard/tests/strings/strrpos_variation4.phpt-crlf

[PHP-CVS] com php-src: Merge branch '5.3' into 5.4: main/streams/streams.c

2012-04-07 Thread Gustavo Andreacute; dos Santos Lopes
Commit:f7d407678570f8e4063b70bd30f3fc19c10442ea
Author:Gustavo André dos Santos Lopes cataphr...@php.net Sat, 7 
Apr 2012 16:34:17 +0100
Parents:   014ed76943071d674cdc308f28b74be18e1caf0c 
0f180a63ebb2d65bbe49b68d2430639b20443e9a
Branches:  PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=f7d407678570f8e4063b70bd30f3fc19c10442ea

Log:
Merge branch '5.3' into 5.4

Changed paths:
  MM  main/streams/streams.c


Diff:



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



[PHP-CVS] com php-src: Merge branch '5.4': main/streams/streams.c

2012-04-07 Thread Gustavo Andreacute; dos Santos Lopes
Commit:bd5f52fd94148b97114e400962c44c29a44694c2
Author:Gustavo André dos Santos Lopes cataphr...@php.net Sat, 7 
Apr 2012 16:34:37 +0100
Parents:   7497aa9c4e48635b06b7688ecd5c1a9d32b017d4 
f7d407678570f8e4063b70bd30f3fc19c10442ea
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=bd5f52fd94148b97114e400962c44c29a44694c2

Log:
Merge branch '5.4'

Changed paths:
  MM  main/streams/streams.c


Diff:



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



[PHP-CVS] com php-src: Update UPGRADING with changes.: UPGRADING

2012-04-01 Thread Gustavo Andreacute; dos Santos Lopes
Commit:0e8d928c0732275a33d7e914158a85085037b857
Author:Gustavo André dos Santos Lopes cataphr...@php.net Sun, 1 
Apr 2012 23:35:29 +0100
Parents:   d32ac3efc8d619f6033a2ff6dee19dd2ba8371a0
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=0e8d928c0732275a33d7e914158a85085037b857

Log:
Update UPGRADING with changes.

Changed paths:
  M  UPGRADING


Diff:
diff --git a/UPGRADING b/UPGRADING
index 3da4596..575ff1b 100755
--- a/UPGRADING
+++ b/UPGRADING
@@ -49,6 +49,74 @@ PHP X.Y UPGRADE NOTES
 5. New Functions
 
 
+- Intl:
+  - intlcal_create_instance()
+  - intlcal_get_keyword_values_for_locale()
+  - intlcal_get_now()
+  - intlcal_get_available_locales()
+  - intlcal_get()
+  - intlcal_get_time()
+  - intlcal_set_time()
+  - intlcal_add()
+  - intlcal_set_time_zone()
+  - intlcal_after()
+  - intlcal_before()
+  - intlcal_set()
+  - intlcal_roll()
+  - intlcal_clear()
+  - intlcal_field_difference()
+  - intlcal_get_actual_maximum()
+  - intlcal_get_actual_minimum()
+  - intlcal_get_day_of_week_type()
+  - intlcal_get_first_day_of_week()
+  - intlcal_get_greatest_minimum()
+  - intlcal_get_least_maximum()
+  - intlcal_get_locale()
+  - intlcal_get_maximum()
+  - intlcal_get_minimal_days_in_first_week()
+  - intlcal_get_minimum()
+  - intlcal_get_time_zone()
+  - intlcal_get_type()
+  - intlcal_get_weekend_transition()
+  - intlcal_in_daylight_time()
+  - intlcal_is_equivalent_to()
+  - intlcal_is_lenient()
+  - intlcal_is_set()
+  - intlcal_is_weekend()
+  - intlcal_set_first_day_of_week()
+  - intlcal_set_lenient()
+  - intlcal_equals()
+  - intlcal_get_repeated_wall_time_option()
+  - intlcal_get_skipped_wall_time_option()
+  - intlcal_set_repeated_wall_time_option()
+  - intlcal_set_skipped_wall_time_option()
+  - intlcal_get_error_code()
+  - intlcal_get_error_message()
+  - intlgregcal_create_instance()
+  - intlgregcal_set_gregorian_change()
+  - intlgregcal_get_gregorian_change()
+  - intlgregcal_is_leap_year()
+  - intltz_create_time_zone()
+  - intltz_create_default()
+  - intltz_get_id()
+  - intltz_get_gmt()
+  - intltz_get_unknown()
+  - intltz_create_enumeration()
+  - intltz_count_equivalent_ids()
+  - intltz_create_time_zone_id_enumeration()
+  - intltz_get_canonical_id()
+  - intltz_get_region()
+  - intltz_get_tz_data_version()
+  - intltz_get_equivalent_id()
+  - intltz_use_daylight_time()
+  - intltz_get_offset()
+  - intltz_get_raw_offset()
+  - intltz_has_same_rules()
+  - intltz_get_display_name()
+  - intltz_get_dst_savings()
+  - intltz_get_error_code()
+  - intltz_get_error_message()
+
 - SPL:
   - SplFixedArray::__wakeup()
 
@@ -56,6 +124,10 @@ PHP X.Y UPGRADE NOTES
 6. New Classes and Interfaces
 
 
+- Intl:
+  - IntlCalendar
+  - IntlGregorianCalendar
+  - IntlTimeZone
 
 
 7. Removed Extensions


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



[PHP-CVS] com php-src: Put new function in correct section.: UPGRADING

2012-04-01 Thread Gustavo Andreacute; dos Santos Lopes
Commit:6c891f33d73afc50c3d79e982c5752fc3f5df85f
Author:Gustavo André dos Santos Lopes cataphr...@php.net Sun, 1 
Apr 2012 23:26:06 +0100
Parents:   ab627e0eb04b3772d7b8da8a1447b0ac6d82df0d
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=6c891f33d73afc50c3d79e982c5752fc3f5df85f

Log:
Put new function in correct section.

Changed paths:
  M  UPGRADING


Diff:
diff --git a/UPGRADING b/UPGRADING
index 6a19917..3da4596 100755
--- a/UPGRADING
+++ b/UPGRADING
@@ -49,13 +49,13 @@ PHP X.Y UPGRADE NOTES
 5. New Functions
 
 
+- SPL:
+  - SplFixedArray::__wakeup()
 
 
 6. New Classes and Interfaces
 
 
-- SPL:
-  - SplFixedArray::__wakeup()
 
 
 7. Removed Extensions


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



[PHP-CVS] com php-src: Revert ext/pcntl/pcntl.c: Fix typo in comment (apply correct workflow): ext/pcntl/pcntl.c

2012-03-29 Thread Gustavo Andreacute; dos Santos Lopes
Commit:117cdf384f5c65e679087ee6402143e2170b8b4b
Author:Gustavo André dos Santos Lopes cataphr...@php.net Thu, 29 
Mar 2012 08:44:19 +0100
Parents:   55b1e612421c52ea0bb8a3772095c5bbd62045db
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=117cdf384f5c65e679087ee6402143e2170b8b4b

Log:
Revert ext/pcntl/pcntl.c: Fix typo in comment (apply correct workflow)

This reverts commit 55b1e612421c52ea0bb8a3772095c5bbd62045db.

Changed paths:
  M  ext/pcntl/pcntl.c


Diff:
117cdf384f5c65e679087ee6402143e2170b8b4b
diff --git a/ext/pcntl/pcntl.c b/ext/pcntl/pcntl.c
index b840066..5151d1f 100755
--- a/ext/pcntl/pcntl.c
+++ b/ext/pcntl/pcntl.c
@@ -760,7 +760,7 @@ PHP_FUNCTION(pcntl_exec)
}

if (ZEND_NUM_ARGS()  1) {
-   /* Build argument list */
+   /* Build argumnent list */
args_hash = HASH_OF(args);
argc = zend_hash_num_elements(args_hash);


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



[PHP-CVS] com php-src: ext/pcntl/pcntl.c: Fix typo in comment: ext/pcntl/pcntl.c

2012-03-29 Thread Gustavo Andreacute; dos Santos Lopes
Commit:710335b2a329c7ab7e2a790aefd489890d528b9a
Author:Jille Timmermans ji...@quis.cx Wed, 28 Mar 2012 16:18:23 
+0200
Committer: Gustavo André dos Santos Lopes cataphr...@php.net  Thu, 29 Mar 
2012 08:46:04 +0100
Parents:   117cdf384f5c65e679087ee6402143e2170b8b4b
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=710335b2a329c7ab7e2a790aefd489890d528b9a

Log:
ext/pcntl/pcntl.c: Fix typo in comment

Signed-off-by: Jille Timmermans ji...@quis.cx

Changed paths:
  M  ext/pcntl/pcntl.c


Diff:
710335b2a329c7ab7e2a790aefd489890d528b9a
diff --git a/ext/pcntl/pcntl.c b/ext/pcntl/pcntl.c
index 5151d1f..b840066 100755
--- a/ext/pcntl/pcntl.c
+++ b/ext/pcntl/pcntl.c
@@ -760,7 +760,7 @@ PHP_FUNCTION(pcntl_exec)
}

if (ZEND_NUM_ARGS()  1) {
-   /* Build argumnent list */
+   /* Build argument list */
args_hash = HASH_OF(args);
argc = zend_hash_num_elements(args_hash);


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



[PHP-CVS] com php-src: Merge branch '5.3' into 5.4: ext/pcntl/pcntl.c

2012-03-29 Thread Gustavo Andreacute; dos Santos Lopes
Commit:f4873c68a600dcd0c6c548c9ecf2d605da878252
Author:Gustavo André dos Santos Lopes cataphr...@php.net Thu, 29 
Mar 2012 08:47:58 +0100
Parents:   616d8029747626d24a07156bdfa5e565a88c85f2 
67bf07f3e79de6653681d9317229c49b5e2415db
Branches:  PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=f4873c68a600dcd0c6c548c9ecf2d605da878252

Log:
Merge branch '5.3' into 5.4

Conflicts:
main/output.c

Changed paths:
  MM  ext/pcntl/pcntl.c


Diff:
f4873c68a600dcd0c6c548c9ecf2d605da878252
diff --combined ext/pcntl/pcntl.c
index 725d55b,b840066..e5910a5
--- a/ext/pcntl/pcntl.c
+++ b/ext/pcntl/pcntl.c
@@@ -760,7 -760,7 +760,7 @@@ PHP_FUNCTION(pcntl_exec
}

if (ZEND_NUM_ARGS()  1) {
-   /* Build argumnent list */
+   /* Build argument list */
args_hash = HASH_OF(args);
argc = zend_hash_num_elements(args_hash);

@@@ -849,11 -849,6 +849,11 @@@ PHP_FUNCTION(pcntl_signal
return;
}
  
 +  if (signo  1 || signo  32) {
 +  php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid signal);
 +  RETURN_FALSE;
 +  }
 +
if (!PCNTL_G(spares)) {
/* since calling malloc() from within a signal handler is not 
portable,
 * pre-allocate a few records for recording signals */
@@@ -869,9 -864,8 +869,9 @@@
  
/* Special long value case for SIG_DFL and SIG_IGN */
if (Z_TYPE_P(handle)==IS_LONG) {
 -  if (Z_LVAL_P(handle)!= (long) SIG_DFL  Z_LVAL_P(handle) != 
(long) SIG_IGN) {
 +  if (Z_LVAL_P(handle) != (long) SIG_DFL  Z_LVAL_P(handle) != 
(long) SIG_IGN) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid 
value for handle argument specified);
 +  RETURN_FALSE;
}
if (php_signal(signo, (Sigfunc *) Z_LVAL_P(handle), (int) 
restart_syscalls) == SIG_ERR) {
PCNTL_G(last_error) = errno;


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



[PHP-CVS] com php-src: Revert ext/pcntl/pcntl.c: Fix typo in comment (apply correct workflow): ext/pcntl/pcntl.c

2012-03-29 Thread Gustavo Andreacute; dos Santos Lopes
Commit:616d8029747626d24a07156bdfa5e565a88c85f2
Author:Gustavo André dos Santos Lopes cataphr...@php.net Thu, 29 
Mar 2012 08:45:00 +0100
Parents:   fe79276371e51a8ee8dff6d5151f902e2129057c
Branches:  PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=616d8029747626d24a07156bdfa5e565a88c85f2

Log:
Revert ext/pcntl/pcntl.c: Fix typo in comment (apply correct workflow)

This reverts commit 4aeabaf8e938af00d6fe9f8316251b543640018c.

Changed paths:
  M  ext/pcntl/pcntl.c


Diff:
616d8029747626d24a07156bdfa5e565a88c85f2
diff --git a/ext/pcntl/pcntl.c b/ext/pcntl/pcntl.c
index e5910a5..725d55b 100755
--- a/ext/pcntl/pcntl.c
+++ b/ext/pcntl/pcntl.c
@@ -760,7 +760,7 @@ PHP_FUNCTION(pcntl_exec)
}

if (ZEND_NUM_ARGS()  1) {
-   /* Build argument list */
+   /* Build argumnent list */
args_hash = HASH_OF(args);
argc = zend_hash_num_elements(args_hash);


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



[PHP-CVS] com php-src: Merge branch '5.4': ext/pcntl/pcntl.c

2012-03-29 Thread Gustavo Andreacute; dos Santos Lopes
Commit:fc4482fd5e95dbdcc984eff6b8084a9e8949d09c
Author:Gustavo André dos Santos Lopes cataphr...@php.net Thu, 29 
Mar 2012 08:48:13 +0100
Parents:   57af2875dc1bdc8768784c323d8449c02df3cff5 
f4873c68a600dcd0c6c548c9ecf2d605da878252
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=fc4482fd5e95dbdcc984eff6b8084a9e8949d09c

Log:
Merge branch '5.4'

Changed paths:
  MM  ext/pcntl/pcntl.c


Diff:
fc4482fd5e95dbdcc984eff6b8084a9e8949d09c
diff --combined ext/pcntl/pcntl.c
index 141ff58,e5910a5..ecb51c1
--- a/ext/pcntl/pcntl.c
+++ b/ext/pcntl/pcntl.c
@@@ -760,7 -760,7 +760,7 @@@ PHP_FUNCTION(pcntl_exec
}

if (ZEND_NUM_ARGS()  1) {
-   /* Build argumnent list */
+   /* Build argument list */
args_hash = HASH_OF(args);
argc = zend_hash_num_elements(args_hash);

@@@ -868,7 -868,7 +868,7 @@@ PHP_FUNCTION(pcntl_signal
}
  
/* Special long value case for SIG_DFL and SIG_IGN */
 -  if (Z_TYPE_P(handle)==IS_LONG) {
 +  if (Z_TYPE_P(handle) == IS_LONG) {
if (Z_LVAL_P(handle) != (long) SIG_DFL  Z_LVAL_P(handle) != 
(long) SIG_IGN) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid 
value for handle argument specified);
RETURN_FALSE;


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



[PHP-CVS] com php-src: Revert Merge branch 'pull-request/24' (apply correct workflow): ext/pcntl/pcntl.c

2012-03-29 Thread Gustavo Andreacute; dos Santos Lopes
Commit:57af2875dc1bdc8768784c323d8449c02df3cff5
Author:Gustavo André dos Santos Lopes cataphr...@php.net Thu, 29 
Mar 2012 08:41:51 +0100
Parents:   a00b447b34c21efab393fef063acaae652506938
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=57af2875dc1bdc8768784c323d8449c02df3cff5

Log:
Revert Merge branch 'pull-request/24' (apply correct workflow)

This reverts commit a00b447b34c21efab393fef063acaae652506938, reversing
changes made to 48daddf093b491d359b77919464827ffb20a3e86.

Changed paths:
  M  ext/pcntl/pcntl.c


Diff:
57af2875dc1bdc8768784c323d8449c02df3cff5
diff --git a/ext/pcntl/pcntl.c b/ext/pcntl/pcntl.c
index ecb51c1..141ff58 100755
--- a/ext/pcntl/pcntl.c
+++ b/ext/pcntl/pcntl.c
@@ -760,7 +760,7 @@ PHP_FUNCTION(pcntl_exec)
}

if (ZEND_NUM_ARGS()  1) {
-   /* Build argument list */
+   /* Build argumnent list */
args_hash = HASH_OF(args);
argc = zend_hash_num_elements(args_hash);


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



[PHP-CVS] com php-src: Restored the good part of 74ee335 that was just reverted.: ext/fileinfo/libmagic/magic.c

2012-03-28 Thread Gustavo Andreacute; dos Santos Lopes
Commit:067603106eba10e7648ccfe11834b10580fde2a9
Author:Gustavo André dos Santos Lopes cataphr...@php.net Wed, 28 
Mar 2012 08:43:41 +0100
Parents:   c6e15455a3e7fa62c77728bf29638207f496ac1d
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=067603106eba10e7648ccfe11834b10580fde2a9

Log:
Restored the good part of 74ee335 that was just reverted.

Changed paths:
  M  ext/fileinfo/libmagic/magic.c


Diff:
067603106eba10e7648ccfe11834b10580fde2a9
diff --git a/ext/fileinfo/libmagic/magic.c b/ext/fileinfo/libmagic/magic.c
index ff9da7f..b4818ae 100644
--- a/ext/fileinfo/libmagic/magic.c
+++ b/ext/fileinfo/libmagic/magic.c
@@ -92,6 +92,7 @@ private const char *file_or_stream(struct magic_set *, const 
char *, php_stream
 #endif
 
 /* XXX this functionality is excluded in php, enable it in apprentice.c:340 */
+#if 0
 private const char *
 get_default_magic(void)
 {
@@ -215,6 +216,7 @@ magic_getpath(const char *magicfile, int action)
 
return action == FILE_LOAD ? get_default_magic() : MAGIC;
 }
+#endif
 
 public struct magic_set *
 magic_open(int flags)


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



[PHP-CVS] com php-src: Revert - fix bug #61504, fix build errors on windows and possibly other: Zend/zend_language_scanner.c Zend/zend_language_scanner_defs.h ext/fileinfo/libmagic/magic.c

2012-03-28 Thread Gustavo Andreacute; dos Santos Lopes
Commit:c6e15455a3e7fa62c77728bf29638207f496ac1d
Author:Gustavo André dos Santos Lopes cataphr...@php.net Wed, 28 
Mar 2012 08:41:18 +0100
Parents:   74ee335e3aea8c48380334098b8d20eb54d6c6be
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=c6e15455a3e7fa62c77728bf29638207f496ac1d

Log:
Revert - fix bug #61504, fix build errors on windows and possibly other

This reverts commit 74ee335e3aea8c48380334098b8d20eb54d6c6be.

Bugs:
https://bugs.php.net/61504

Changed paths:
  M  Zend/zend_language_scanner.c
  M  Zend/zend_language_scanner_defs.h
  M  ext/fileinfo/libmagic/magic.c


Diff: Diff exceeded maximum size

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



[PHP-CVS] com php-src: Refactoring junit logger. Added generation of nested testsuites in junit.xml.: run-tests.php

2012-03-28 Thread Gustavo Andreacute; dos Santos Lopes
Commit:1e88d0033ffdd11475445e22d844e2513a8a1fc8
Author:Shein Alexey con...@gmail.com Thu, 22 Mar 2012 02:59:02 
+0500
Committer: Gustavo André dos Santos Lopes cataphr...@php.net  Wed, 28 Mar 
2012 21:39:24 +0100
Parents:   eeab3be3037e2c537393f630b496017c9f888736
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=1e88d0033ffdd11475445e22d844e2513a8a1fc8

Log:
Refactoring junit logger. Added generation of nested testsuites in junit.xml.

Changed paths:
  M  run-tests.php

1e88d0033ffdd11475445e22d844e2513a8a1fc8
diff --git a/run-tests.php b/run-tests.php
index 3804870..cc193e5 100755
--- a/run-tests.php
+++ b/run-tests.php
@@ -200,25 +200,7 @@ if (getenv('TEST_PHP_DETAILED')) {
$DETAILED = 0;
 }
 
-// Check whether a junit log is wanted.
-$JUNIT = getenv('TEST_PHP_JUNIT');
-if (empty($JUNIT) || (!file_exists($JUNIT)  !is_writable(dirname($JUNIT))) 
|| (file_exists($JUNIT)  !is_writable($JUNIT)) || !($JUNIT = @fopen($JUNIT, 
'w'))) {
-   $JUNIT = FALSE;
-}
-else{
-   $JUNIT = array(
-   'fp'= $JUNIT,
-   'test_total'= 0,
-   'test_pass' = 0,
-   'test_fail' = 0,
-   'test_error'= 0,
-   'test_skip' = 0,
-   'started_at'= microtime(true),
-   'finished_at'   = NULL,
-   'execution_time'= NULL,
-   'result_xml'= '',
-   );
-}
+junit_init();
 
 if (getenv('SHOW_ONLY_GROUPS')) {
$SHOW_ONLY_GROUPS = explode(,, getenv('SHOW_ONLY_GROUPS'));
@@ -336,7 +318,7 @@ define('QA_REPORTS_PAGE', 'http://qa.php.net/reports');
 function save_or_mail_results()
 {
global $sum_results, $just_save_results, $failed_test_summary,
-  $PHP_FAILED_TESTS, $CUR_DIR, $php, $output_file, $compression;
+  $PHP_FAILED_TESTS, $CUR_DIR, $php, $output_file, 
$compression;
 
/* We got failed Tests, offer the user to send an e-mail to QA team, 
unless NO_INTERACTION is set */
if (!getenv('NO_INTERACTION')) {
@@ -831,10 +813,8 @@ HELP;
if ($output_file != ''  $just_save_results) {
save_or_mail_results();
}
-   
-   if ($JUNIT) {
-   save_junit_xml();
-   }
+
+   junit_save_xml();
 
if (getenv('REPORT_EXIT_STATUS') == 1 and 
preg_match('/FAILED(?: |$)/', implode(' ', $test_results))) {
exit(1);
@@ -970,9 +950,7 @@ if ($html_output) {
 
 save_or_mail_results();
 
-if ($JUNIT) {
-   save_junit_xml();
-}
+junit_save_xml();
 
 if (getenv('REPORT_EXIT_STATUS') == 1 and $sum_results['FAILED']) {
exit(1);
@@ -987,19 +965,19 @@ function mail_qa_team($data, $compression, $status = 
false)
 {
$url_bits = parse_url(QA_SUBMISSION_PAGE);
 
-if (($proxy = getenv('http_proxy'))) {
-$proxy = parse_url($proxy);
-$path = $url_bits['host'].$url_bits['path'];
-$host = $proxy['host'];
-if (empty($proxy['port'])) {
-$proxy['port'] = 80;
-}
-$port = $proxy['port'];
-} else {
-$path = $url_bits['path'];
-$host = $url_bits['host'];
-$port = empty($url_bits['port']) ? 80 : $port = $url_bits['port'];
-}
+   if (($proxy = getenv('http_proxy'))) {
+   $proxy = parse_url($proxy);
+   $path = $url_bits['host'].$url_bits['path'];
+   $host = $proxy['host'];
+   if (empty($proxy['port'])) {
+   $proxy['port'] = 80;
+   }
+   $port = $proxy['port'];
+   } else {
+   $path = $url_bits['path'];
+   $host = $url_bits['host'];
+   $port = empty($url_bits['port']) ? 80 : $port = 
$url_bits['port'];
+   }
 
$data = php_test_data= . urlencode(base64_encode(str_replace(\00, 
'[0x0]', $data)));
$data_length = strlen($data);
@@ -1329,14 +1307,8 @@ TEST $file
'diff'  = 
'',
'info'  = 
$bork_info [$file],
);
-   
-   if ($JUNIT) {
-   $JUNIT['test_total']++;
-   $JUNIT['test_error']++;
-   $JUNIT['result_xml'] .= 'testcase 
classname='.$shortname.' name='.htmlspecialchars($tested_file, 
ENT_QUOTES).' time=0'.\n;
-   $JUNIT['result_xml'] .= 'error type=BORKED 
message='.$bork_info.' /'.\n;
-   $JUNIT['result_xml'] .= '/testcase'.\n;
-   }
+
+   junit_mark_test_as('BORK', $shortname, $tested_file, 0, 
$bork_info);
return 'BORKED';
}
 
@@ -1362,13 +1334,8 @@ TEST $file
$php = realpath(dirname($php) . /php-cgi) . ' 
-C 

[PHP-CVS] com php-src: Fixed bug #61453.: NEWS ext/spl/spl_observer.c ext/spl/tests/bug61453.phpt

2012-03-21 Thread Gustavo Andreacute; dos Santos Lopes
Commit:0f001703a8987960de041b216a023869ab439857
Author:Gustavo André dos Santos Lopes cataphr...@php.net Wed, 21 
Mar 2012 12:39:30 +
Parents:   1e18f11c9ab56fb120c9e26ecd3f68f0651cddde
Branches:  PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=0f001703a8987960de041b216a023869ab439857

Log:
Fixed bug #61453.

The hash function used strncpy on data that would have NUL bytes, ending the
copy prematurely and causing collisions between objects.

Bugs:
https://bugs.php.net/61453

Changed paths:
  M  NEWS
  M  ext/spl/spl_observer.c
  A  ext/spl/tests/bug61453.phpt


Diff:
0f001703a8987960de041b216a023869ab439857
diff --git a/NEWS b/NEWS
index af4f4c9..530159c 100644
--- a/NEWS
+++ b/NEWS
@@ -96,6 +96,8 @@ PHP   
 NEWS
 ReflectionMethod::invokeArgs()). (Laruence)
 
 - SPL:
+  . Fixed bug #61453 (SplObjectStorage does not identify objects correctly).
+(Gustavo)
   . Fixed bug #61347 (inconsistent isset behavior of Arrayobject). (Laruence)
 
 - Standard:
diff --git a/ext/spl/spl_observer.c b/ext/spl/spl_observer.c
index 5eaa8fd..4b8be82 100755
--- a/ext/spl/spl_observer.c
+++ b/ext/spl/spl_observer.c
@@ -146,14 +146,14 @@ static char 
*spl_object_storage_get_hash(spl_SplObjectStorage *intern, zval *thi
 
return (char*)Z_OBJVAL_P(obj);
 #else
-   char *hash = emalloc((hash_len+1)*sizeof(char));
+   char *hash = emalloc(hash_len + 1);
 
zend_object_value zvalue;
memset(zvalue, 0, sizeof(zend_object_value));
zvalue.handle = Z_OBJ_HANDLE_P(obj);
zvalue.handlers = Z_OBJ_HT_P(obj);
 
-   strncpy(hash, (char *)zvalue, hash_len);
+   memcpy(hash, (char *)zvalue, hash_len);
hash[hash_len] = 0;
 
if (hash_len_ptr) {
diff --git a/ext/spl/tests/bug61453.phpt b/ext/spl/tests/bug61453.phpt
new file mode 100644
index 000..e5b1387
--- /dev/null
+++ b/ext/spl/tests/bug61453.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Bug #61453:SplObjectStorage does not identify objects correctly
+--FILE--
+?php
+$limit = 1000;
+$objects = new SplObjectStorage;
+for($i = 0; $i  $limit; $i++){
+   $object = new StdClass;
+
+   if(isset($objects[$object])){
+   die(this should never happen, but did after $i iteration);
+   }
+
+   $objects[$object] = 1;
+}
+?
+==DONE==
+--EXPECT--
+==DONE==


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



[PHP-CVS] [git] branch php-src.git: update branch PHP-5.4

2012-03-19 Thread Gustavo Andreacute; dos Santos Lopes
Branch PHP-5.4 in php-src.git was updated
Date: Mon, 19 Mar 2012 18:01:12 +

Link: 
http://git.php.net/?p=php-src.git;a=log;h=f5f5ca5d77cfe47b9556b3cc37fbf9605b822e5c;hp=5bfd8920a2782e8347bcf15a4a702b0213b165f6


Log:
Commit: f5f5ca5d77cfe47b9556b3cc37fbf9605b822e5c
Author: Gustavo André dos Santos Lopes(cataphr...@php.net) Mon, 19 Mar 
2012 17:50:13 +
Committer: Gustavo André dos Santos Lopes(cataphr...@php.net)  Mon, 19 Mar 
2012 17:50:13 +
Link: 
http://git.php.net/?p=php-src.git;a=commitdiff;h=f5f5ca5d77cfe47b9556b3cc37fbf9605b822e5c
Shortlog: Merge branch 'PHP-5.4' of git.php.net:/php-src into 5.4

Commit: cfdd6c5788afc6fb907f6f518dceab4fd82c922e
Author: Gustavo André dos Santos Lopes(cataphr...@php.net) Sun, 5 Feb 
2012 14:57:57 +
Committer: Gustavo André dos Santos Lopes(cataphr...@php.net)  Mon, 19 Mar 
2012 16:36:21 +
Link: 
http://git.php.net/?p=php-src.git;a=commitdiff;h=cfdd6c5788afc6fb907f6f518dceab4fd82c922e
Shortlog: MFH: 7dcada1 for 5.4

Commit: 9a460497da3cc2b755f4628350756427fc0a1051
Author: Gustavo André dos Santos Lopes(cataphr...@php.net) Mon, 19 Mar 
2012 16:28:10 +
Committer: Gustavo André dos Santos Lopes(cataphr...@php.net)  Mon, 19 Mar 
2012 16:34:31 +
Link: 
http://git.php.net/?p=php-src.git;a=commitdiff;h=9a460497da3cc2b755f4628350756427fc0a1051
Shortlog: MFH: 45a6f8d for 5.4.




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



[PHP-CVS] [git] commit php-src.git:

2012-03-19 Thread Gustavo Andreacute; dos Santos Lopes
Commit: f5f5ca5d77cfe47b9556b3cc37fbf9605b822e5c
Author: Gustavo André dos Santos Lopes(cataphr...@php.net) Mon, 19 Mar 
2012 17:50:13 +
Committer: Gustavo André dos Santos Lopes(cataphr...@php.net)  Mon, 19 Mar 
2012 17:50:13 +
Parents: cfdd6c5788afc6fb907f6f518dceab4fd82c922e 
5bfd8920a2782e8347bcf15a4a702b0213b165f6

Link: 
http://git.php.net/?p=php-src.git;a=commitdiff;h=f5f5ca5d77cfe47b9556b3cc37fbf9605b822e5c

Log:
Merge branch 'PHP-5.4' of git.php.net:/php-src into 5.4

Changed paths:


Diff:
f5f5ca5d77cfe47b9556b3cc37fbf9605b822e5c


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



[PHP-CVS] [git] commit php-src.git: ext/standard/html.c

2012-03-19 Thread Gustavo Andreacute; dos Santos Lopes
Commit: cfdd6c5788afc6fb907f6f518dceab4fd82c922e
Author: Gustavo André dos Santos Lopes(cataphr...@php.net) Sun, 5 Feb 
2012 14:57:57 +
Committer: Gustavo André dos Santos Lopes(cataphr...@php.net)  Mon, 19 Mar 
2012 16:36:21 +
Parents: 9a460497da3cc2b755f4628350756427fc0a1051

Link: 
http://git.php.net/?p=php-src.git;a=commitdiff;h=cfdd6c5788afc6fb907f6f518dceab4fd82c922e

Log:
MFH: 7dcada1 for 5.4

- Fixed possible unsigned int wrap around in html.c. Note that 5.3 has the same
  (potential) problem; even though the code is substantially different, the
  variable name and the fashion it was incremented was kept.

Changed paths:
  M  ext/standard/html.c


Diff:
cfdd6c5788afc6fb907f6f518dceab4fd82c922e
diff --git a/ext/standard/html.c b/ext/standard/html.c
index 5b47a83..65e63f4 100644
--- a/ext/standard/html.c
+++ b/ext/standard/html.c
@@ -1258,9 +1258,13 @@ PHPAPI char *php_escape_html_entities_ex(unsigned char 
*old, size_t oldlen, size
maxlen = 128;   
} else {
maxlen = 2 * oldlen;
+   if (maxlen  oldlen) {
+   zend_error_noreturn(E_ERROR, Input string is too 
long);
+   return NULL;
+   }
}
 
-   replaced = emalloc(maxlen + 1);
+   replaced = emalloc(maxlen + 1); /* adding 1 is safe: maxlen is even */
len = 0;
cursor = 0;
while (cursor  oldlen) {
@@ -1272,8 +1276,9 @@ PHPAPI char *php_escape_html_entities_ex(unsigned char 
*old, size_t oldlen, size
 
/* guarantee we have at least 40 bytes to write.
 * In HTML5, entities may take up to 33 bytes */
-   if (len + 40  maxlen) {
-   replaced = erealloc(replaced, (maxlen += 128) + 1);
+   if (len  maxlen - 40) { /* maxlen can never be smaller than 
128 */
+   replaced = safe_erealloc(replaced, maxlen , 1, 128 + 1);
+   maxlen += 128;
}
 
if (status == FAILURE) {
@@ -1402,8 +1407,11 @@ encode_amp:
}
/* checks passed; copy entity to result */
/* entity size is unbounded, we may need more 
memory */
-   if (maxlen  len + ent_len + 2 /*  and ; */) {
-   replaced = erealloc(replaced, (maxlen 
+= ent_len + 128) + 1);
+   /* at this point maxlen - len = 40 */
+   if (maxlen - len  ent_len + 2 /*  and ; */) {
+   /* ent_len  oldlen, which is certainly 
= SIZE_MAX/2 */
+   replaced = safe_erealloc(replaced, 
maxlen, 1, ent_len + 128 + 1);
+   maxlen += ent_len + 128;
}
replaced[len++] = '';
memcpy(replaced[len], old[cursor], ent_len);


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



[PHP-CVS] [git] commit php-src.git: ext/standard/tests/streams/bug60455_02.phpt ext/standard/tests/streams/bug60455_03.phpt ext/standard/tests/streams/bug60455_04.phpt ext/standard/tests/streams/bug60

2012-03-19 Thread Gustavo Andreacute; dos Santos Lopes
Commit: 9a460497da3cc2b755f4628350756427fc0a1051
Author: Gustavo André dos Santos Lopes(cataphr...@php.net) Mon, 19 Mar 
2012 16:28:10 +
Committer: Gustavo André dos Santos Lopes(cataphr...@php.net)  Mon, 19 Mar 
2012 16:34:31 +
Parents: 53e3467ff233af4a40626f86ea8a61880722beb8

Link: 
http://git.php.net/?p=php-src.git;a=commitdiff;h=9a460497da3cc2b755f4628350756427fc0a1051

Log:
MFH: 45a6f8d for 5.4.

- Further fix for bug #60455 (stream_get_line misbehaves if EOF is not detected
  together with the last read).
- Fixed bug #60817 (stream_get_line() reads from stream even when there is
  already sufficient data buffered). stream_get_line() now behaves more like
  fgets(), as is documented.

Bugs:
https://bugs.php.net/60455
https://bugs.php.net/60817

Changed paths:
  M  ext/standard/tests/streams/bug60455_02.phpt
  M  ext/standard/tests/streams/bug60455_03.phpt
  A  ext/standard/tests/streams/bug60455_04.phpt
  A  ext/standard/tests/streams/bug60817.phpt
  M  main/streams/streams.c

9a460497da3cc2b755f4628350756427fc0a1051
diff --git a/ext/standard/tests/streams/bug60455_02.phpt 
b/ext/standard/tests/streams/bug60455_02.phpt
index 6e06e9f..0ddf346 100644
--- a/ext/standard/tests/streams/bug60455_02.phpt
+++ b/ext/standard/tests/streams/bug60455_02.phpt
@@ -28,3 +28,4 @@ while (!feof($f)) {
 }
 --EXPECT--
 string(1) a
+bool(false)
diff --git a/ext/standard/tests/streams/bug60455_03.phpt 
b/ext/standard/tests/streams/bug60455_03.phpt
index 5d7ba1f..2429d31 100644
--- a/ext/standard/tests/streams/bug60455_03.phpt
+++ b/ext/standard/tests/streams/bug60455_03.phpt
@@ -47,7 +47,9 @@ while (!feof($f)) {
 --EXPECT--
 string(1) a
 string(1) b
+bool(false)
 string(1) a
 string(0) 
+bool(false)
 string(1) a
 string(0) 
diff --git a/ext/standard/tests/streams/bug60455_04.phpt 
b/ext/standard/tests/streams/bug60455_04.phpt
new file mode 100644
index 000..3a82298
--- /dev/null
+++ b/ext/standard/tests/streams/bug60455_04.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Bug #60455: stream_get_line and 1-line with maxlen size followed by 0-length
+read with EOL indication
+--FILE--
+?php
+class TestStream {
+   private $s = 0;
+   function stream_open($path, $mode, $options, $opened_path) {
+   return true;
+   }
+   function stream_read($count) {
+   if ($this-s++ == 0)
+   return a\n;
+   
+   return ;
+   }
+   function stream_eof() {
+   return $this-s = 2;
+   }
+   
+}
+
+stream_wrapper_register(test, TestStream);
+
+$f = fopen(test://, r);
+while (!feof($f)) {
+$line = stream_get_line($f, 2, \n);
+var_dump($line);
+}
+--EXPECT--
+string(1) a
+bool(false)
diff --git a/ext/standard/tests/streams/bug60817.phpt 
b/ext/standard/tests/streams/bug60817.phpt
new file mode 100644
index 000..2d4cf26
--- /dev/null
+++ b/ext/standard/tests/streams/bug60817.phpt
@@ -0,0 +1,36 @@
+--TEST--
+Bug #60817: stream_get_line() reads from stream even when there is already 
sufficient data buffered
+--FILE--
+?php
+class TestStream { //data, empty data, empty data + eof
+private $s = 0;
+function stream_open($path, $mode, $options, $opened_path) {
+return true;
+}
+function stream_read($count) {
+echo Read done\n;
+if ($this-s++ == 0)
+return a\nbb\ncc;
+
+return ;
+}
+function stream_eof() {
+return $this-s = 2;
+}
+
+}
+
+stream_wrapper_register(test, TestStream);
+
+$f = fopen(test://, r);
+while (!feof($f)) {
+$line = stream_get_line($f, 99, \n);
+var_dump($line);
+}
+
+--EXPECT--
+Read done
+string(1) a
+string(2) bb
+Read done
+string(2) cc
diff --git a/main/streams/streams.c b/main/streams/streams.c
index 1614307..89fa364 100755
--- a/main/streams/streams.c
+++ b/main/streams/streams.c
@@ -996,77 +996,111 @@ PHPAPI char *_php_stream_get_line(php_stream *stream, 
char *buf, size_t maxlen,
return bufstart;
 }
 
+#define STREAM_BUFFERED_AMOUNT(stream) \
+   ((size_t)(((stream)-writepos) - (stream)-readpos))
+
+static char *_php_stream_search_delim(php_stream *stream,
+ 
size_t maxlen,
+ 
size_t skiplen,
+ char 
*delim, /* non-empty! */
+ 
size_t delim_len TSRMLS_DC)
+{
+   size_t  seek_len;
+
+   /* set the maximum number of bytes we're allowed to read from buffer */
+   seek_len = MIN(STREAM_BUFFERED_AMOUNT(stream), maxlen);
+   if (seek_len = skiplen) {
+   return NULL;
+   }
+
+   if (delim_len == 1) {
+   return memchr(stream-readbuf[stream-readpos + skiplen],
+   delim[0], seek_len - skiplen);
+   } else {
+   return