Re: [PHP-CVS] svn: /php/php-src/trunk/main/streams/ php_stream_context.h streams.c

2012-02-22 Thread Pierre Joye
hi,

On Tue, Feb 21, 2012 at 11:09 PM, Gustavo Lopes glo...@nebm.ist.utl.pt wrote:

 Perhaps someone's private code used it?


 Sure, it's possible. In that case, they'll have a long time to complain
 since this is only for trunk and PHP 5.5 is years away.

No, php-next begins next year, one year after we began 5.4.

However, where is the discussion about dropping this?

I'm not saying we should keep it but a discussion is a must in this
case, on internals, at least to give a chance to possible users or
other devs to raise their points.

Cheers,
-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

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



[PHP-CVS] svn: /php/php-src/trunk/ UPGRADING UPGRADING.INTERNALS

2012-02-22 Thread Gustavo André dos Santos Lopes
cataphract   Wed, 22 Feb 2012 10:08:37 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=323423

Log:
- Cleanup UPGRADING and UPGRADING.INTERNALS from 5.4 changes.
- Added information about removal of streams pooling API.

Changed paths:
U   php/php-src/trunk/UPGRADING
U   php/php-src/trunk/UPGRADING.INTERNALS

Modified: php/php-src/trunk/UPGRADING
===
--- php/php-src/trunk/UPGRADING	2012-02-22 09:33:01 UTC (rev 323422)
+++ php/php-src/trunk/UPGRADING	2012-02-22 10:08:37 UTC (rev 323423)
@@ -36,57 +36,8 @@
 1. Changes made to default configuration
 

-- The default_charset setting now defaults to UTF-8.
-  It was ISO-88590-1 before, so if you were relying
-  on the default, you will need to add:
+-

-default_charset = iso-8859-1
-
-  to your php.ini to preserve pre-PHPX.Y behavior.
-
-- We now check at compile time if /dev/urandom or /dev/arandom
-  are present to provide non-blocking entropy to session id
-  generation.  If either is present, session.entropy_file
-  now defaults to that file and session.entropy_length defaults
-  to 32.  If you do not want extra entropy for your session ids
-  for some reason, add:
-
-session.entropy_file=
-session.entropy_length=0
-
-  to your php.ini to preserve pre-PHPX.Y behavior.
-
-- Deprecated ini directives will now throw an E_CORE_WARNING's
-  instead of the previous E_WARNING's.
-
-  The following directives are marked as deprecated:
-  - magic_quotes_gpc
-  - magic_quotes_runtime
-  - magic_quotes_sybase
-
-- The following directives, which indicates a removed feature
-  in PHP will now throw an E_CORE_ERROR upon startup like the
-  deprecation warnings.
-
-  The following directives are no longer available:
-  - allow_call_time_pass_reference
-  - define_syslog_variables
-  - highlight.bg
-  - register_globals
-  - register_long_arrays
-  - safe_mode
-  - safe_mode_gid
-  - safe_mode_include_dir
-  - safe_mode_exec_dir
-  - safe_mode_allowed_env_vars
-  - safe_mode_protected_env_vars
-  - zend.ze1_compatibility_mode
-
-- the following new directives were added
-
-  - max_input_vars - specifies how many GET/POST/COOKIE input variables may be
-accepted. default value 1000.
-
 =
 2. Reserved words and classes
 =
@@ -97,96 +48,13 @@
 3. Changes made to engine behaviour
 =

-- Turning null, false or empty string into an object by adding a property
-  will now emit a warning instead of an E_STRICT error.
-
-  $test = null;
-  $test-baz = 1;
-
-  To create a generic object you can use StdClass:
-  $test = new StdClass;
-  $test-baz = 1;
+-

-- In previous versions, names of superglobals could be used for parameter
-  names, thereby shadowing the corresponding superglobal. This now causes a
-  fatal error such as Cannot re-assign auto-global variable GLOBALS.
-
 =
 4. Changes made to existing functions
 =

-- array_combine now returns array() instead of FALSE when two empty arrays are
-  provided as parameters.
-- Added an extra parameter to dns_get_record(), which allows requesting DNS
-  records by numeric type and makes the result include only the raw data of
-  the response.
-- call_user_func_array no longer allows call-time pass by reference.
-- htmlentities/htmlspecialchars are stricter in the code units they accept for
-  the asian encodings. For Big5-HKSCS, the octets 0x80 and 0xFF are rejected.
-  For GB2312/EUC-CN, the octets 0x8E, 0x8F, 0xA0 and 0xFF are rejected. For
-  SJIS, the octets 0x80, 0xA0, 0xFD, 0xFE and 0xFF are rejected, except maybe
-  after a valid starting byte. For EUC-JP, the octets 0xA0 and 0xFF are
-  rejected.
-- htmlentities now emits an E_STRICT warning when used with asian characters,
-  as in that case htmlentities has (and already had before this version) the
-  same functionality as htmlspecialchars.
-- htmlentities no longer numerically encodes high characters for single-byte
-  encodings (except when there's actually a corresponding named entity). This
-  behavior was not documented and was inconsistent with that for UTF-8.
-- html_entity_decode/htmlspecialchars_decode behave more consistently, now
-  decoding entities in malformed strings such as amp; or #amp;.
-- htmlentities/htmlspecialchars/html_entity_decode/htmlspecialchars_decode:
-  Added the flags ENT_HTML401, ENT_XML1, ENT_XHTML, and ENT_HTML5. The
-  behavior of these functions including, but not limited to, the characters
-  that are encoded and the entities that are decoded depend on the document
-  type that is specified by those flags.
-- htmlentities/htmlspecialchars with !$double_encode do more strict checks on
-  the validity of the entities. Numerical entities are checked for a valid
-  range (0 to 0x10); if the flag ENT_DISALLOWED is 

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/standard/tests/streams/bug61115.phpt branches/PHP_5_3/main/streams/streams.c trunk/ext/standard/tests/streams/bug61115.phpt trun

2012-02-22 Thread Gustavo André dos Santos Lopes
cataphract   Wed, 22 Feb 2012 11:45:26 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=323425

Log:
- Fixed bug #61115 (stream related segfault on fatal error in
  php_stream_context_link).
#run-tests.php is not currently detecting the segfault in the test
#Missing 5.4 merge

Bug: https://bugs.php.net/61115 (Analyzed) Stream related segfault on fatal 
error in php_stream_context_del_link
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
A   php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug61115.phpt
U   php/php-src/branches/PHP_5_3/main/streams/streams.c
A   php/php-src/trunk/ext/standard/tests/streams/bug61115.phpt
U   php/php-src/trunk/main/streams/streams.c

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2012-02-22 11:15:49 UTC (rev 323424)
+++ php/php-src/branches/PHP_5_3/NEWS   2012-02-22 11:45:26 UTC (rev 323425)
@@ -29,6 +29,8 @@
   . Fixed bug #60802 (ibase_trans() gives segfault when passing params).

 - Streams:
+  . Fixed bug #61115 (stream related segfault on fatal error in
+php_stream_context_link). (Gustavo)
   . Further fix for bug #60455 (stream_get_line misbehaves if EOF is not 
detected
 together with the last read). (Gustavo)
   . Fixed bug #60817 (stream_get_line() reads from stream even when there is

Added: php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug61115.phpt
===
--- php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug61115.phpt   
(rev 0)
+++ php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug61115.phpt   
2012-02-22 11:45:26 UTC (rev 323425)
@@ -0,0 +1,13 @@
+--TEST--
+Bug #61115: Stream related segfault on fatal error in 
php_stream_context_del_link.
+--FILE--
+?php
+
+$arrayLarge = array_fill(0, 113663, '*');
+
+$resourceFileTemp = fopen('php://temp', 'r+');
+stream_context_set_params($resourceFileTemp, array());
+preg_replace('', function() {}, $resourceFileTemp);
+?
+--EXPECTF--
+Catchable fatal error: Object of class Closure could not be converted to 
string in %s on line %d


Property changes on: 
php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug61115.phpt
___
Added: svn:keywords
   + Id Rev Revision
Added: svn:eol-style
   + native

Modified: php/php-src/branches/PHP_5_3/main/streams/streams.c
===
--- php/php-src/branches/PHP_5_3/main/streams/streams.c 2012-02-22 11:15:49 UTC 
(rev 323424)
+++ php/php-src/branches/PHP_5_3/main/streams/streams.c 2012-02-22 11:45:26 UTC 
(rev 323425)
@@ -320,7 +320,9 @@
int remove_rsrc = 1;
int preserve_handle = close_options  PHP_STREAM_FREE_PRESERVE_HANDLE ? 
1 : 0;
int release_cast = 1;
-   php_stream_context *context = stream-context;
+   /* on an unclean shutdown, the context may have already been freed (if 
it
+* was created after the stream resource), so don't reference it */
+   php_stream_context *context = CG(unclean_shutdown) ? NULL : 
stream-context;

if (stream-flags  PHP_STREAM_FLAG_NO_CLOSE) {
preserve_handle = 1;
@@ -374,8 +376,8 @@
}

/* Remove stream from any context link list */
-   if (stream-context  stream-context-links) {
-   php_stream_context_del_link(stream-context, stream);
+   if (context  context-links) {
+   php_stream_context_del_link(context, stream);
}

if (close_options  PHP_STREAM_FREE_CALL_DTOR) {

Added: php/php-src/trunk/ext/standard/tests/streams/bug61115.phpt
===
--- php/php-src/trunk/ext/standard/tests/streams/bug61115.phpt  
(rev 0)
+++ php/php-src/trunk/ext/standard/tests/streams/bug61115.phpt  2012-02-22 
11:45:26 UTC (rev 323425)
@@ -0,0 +1,13 @@
+--TEST--
+Bug #61115: Stream related segfault on fatal error in 
php_stream_context_del_link.
+--FILE--
+?php
+
+$arrayLarge = array_fill(0, 113663, '*');
+
+$resourceFileTemp = fopen('php://temp', 'r+');
+stream_context_set_params($resourceFileTemp, array());
+preg_replace('', function() {}, $resourceFileTemp);
+?
+--EXPECTF--
+Catchable fatal error: Object of class Closure could not be converted to 
string in %s on line %d


Property changes on: php/php-src/trunk/ext/standard/tests/streams/bug61115.phpt
___
Added: svn:keywords
   + Id Rev Revision
Added: svn:eol-style
   + native

Modified: php/php-src/trunk/main/streams/streams.c
===
--- php/php-src/trunk/main/streams/streams.c2012-02-22 11:15:49 UTC (rev 
323424)
+++ 

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ NEWS

2012-02-22 Thread Nikita Popov
nikicWed, 22 Feb 2012 17:21:57 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=323432

Log:
NEWS for r323362

Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2012-02-22 16:14:47 UTC (rev 323431)
+++ php/php-src/branches/PHP_5_3/NEWS   2012-02-22 17:21:57 UTC (rev 323432)
@@ -60,6 +60,9 @@
 - XMLRPC:
   . Fixed bug #61097 (Memory leak in xmlrpc functions copying zvals). (Nikic)

+- Zlib:
+  . Fixed bug #61139 (gzopen leaks when specifying invalid mode). (Nikic)
+
 02 Feb 2012, PHP 5.3.10

 - Core:

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

[PHP-CVS] svn: /SVNROOT/ global_avail

2012-02-22 Thread Philip Olson
philip   Wed, 22 Feb 2012 20:46:06 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=323434

Log:
Added phpdoc/es karma for Juan Maureira (juanframaureira)

Changed paths:
U   SVNROOT/global_avail

Modified: SVNROOT/global_avail
===
--- SVNROOT/global_avail2012-02-22 18:56:38 UTC (rev 323433)
+++ SVNROOT/global_avail2012-02-22 20:46:06 UTC (rev 323434)
@@ -82,7 +82,7 @@
 avail|mkoula|phpdoc/cs
 avail|penguin,tkxs|phpdoc/da
 avail|kore,thorstenr,lapistano,raphaelm,patrickeigensatz,khp|phpdoc/de
-avail|mgonzalezle,ianasa,gustavo,soywiz,ladderalice,ideados,fcaroberga,dulasoft,benjamin,argosback,tatai,jesusruiz,jpberdejo,lduran,sabathorn,julionc,jorgeeolayap,jesus_cova,edwincartagenah,gerardocdc,hcrow,jmperez,agarzon,chuso,jesusdiez,ruben,marcogrossisas,juanmi,bng5,lehmer,jvenegasperu,hugo_quinter,numerico,andresdzphp,alejandrorodas|phpdoc/es
+avail|mgonzalezle,ianasa,gustavo,soywiz,ladderalice,ideados,fcaroberga,dulasoft,benjamin,argosback,tatai,jesusruiz,jpberdejo,lduran,sabathorn,julionc,jorgeeolayap,jesus_cova,edwincartagenah,gerardocdc,hcrow,jmperez,agarzon,chuso,jesusdiez,ruben,marcogrossisas,juanmi,bng5,lehmer,jvenegasperu,hugo_quinter,numerico,andresdzphp,alejandrorodas,juanframaureira|phpdoc/es
 avail|parstic|phpdoc/fa
 avail|butera|phpdoc/it
 avail|magidev,mikaelkael,blanchonvincent|phpdoc/fr

-- 
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/openssl/openssl.c branches/PHP_5_4/NEWS branches/PHP_5_4/ext/openssl/openssl.c trunk/ext/openssl/openssl.c

2012-02-22 Thread Scott MacVicar
scottmac Thu, 23 Feb 2012 01:26:46 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=323440

Log:
Fixed bug #61124 (Crash when decoding an invalid base64 encoded string).

Bug: https://bugs.php.net/61124 (Assigned) Segmentation fault
  
Changed paths:
U   php/php-src/branches/PHP_5_3/ext/openssl/openssl.c
U   php/php-src/branches/PHP_5_4/NEWS
U   php/php-src/branches/PHP_5_4/ext/openssl/openssl.c
U   php/php-src/trunk/ext/openssl/openssl.c

Modified: php/php-src/branches/PHP_5_3/ext/openssl/openssl.c
===
--- php/php-src/branches/PHP_5_3/ext/openssl/openssl.c  2012-02-22 23:42:18 UTC 
(rev 323439)
+++ php/php-src/branches/PHP_5_3/ext/openssl/openssl.c  2012-02-23 01:26:46 UTC 
(rev 323440)
@@ -4776,6 +4776,10 @@

if (!raw_input) {
base64_str = (char*)php_base64_decode((unsigned char*)data, 
data_len, base64_str_len);
+   if (!base64_str) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Failed to 
base64 decode the input);
+   RETURN_FALSE;
+   }
data_len = base64_str_len;
data = base64_str;
}

Modified: php/php-src/branches/PHP_5_4/NEWS
===
--- php/php-src/branches/PHP_5_4/NEWS   2012-02-22 23:42:18 UTC (rev 323439)
+++ php/php-src/branches/PHP_5_4/NEWS   2012-02-23 01:26:46 UTC (rev 323440)
@@ -1,6 +1,9 @@
 PHPNEWS
 |||
 ?? ??? 2012, PHP 5.4.0 RC 9
+- OpenSSL:
+  . Fixed bug #61124 (Crash when decoding an invalid base64 encoded string).
+(me at ktamura dot com, Scott)

 15 Feb 2012, PHP 5.4.0 RC 8
 - Core:

Modified: php/php-src/branches/PHP_5_4/ext/openssl/openssl.c
===
--- php/php-src/branches/PHP_5_4/ext/openssl/openssl.c  2012-02-22 23:42:18 UTC 
(rev 323439)
+++ php/php-src/branches/PHP_5_4/ext/openssl/openssl.c  2012-02-23 01:26:46 UTC 
(rev 323440)
@@ -4803,6 +4803,10 @@

if (!(options  OPENSSL_RAW_DATA)) {
base64_str = (char*)php_base64_decode((unsigned char*)data, 
data_len, base64_str_len);
+   if (!base64_str) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Failed to 
base64 decode the input);
+   RETURN_FALSE;
+   }
data_len = base64_str_len;
data = base64_str;
}

Modified: php/php-src/trunk/ext/openssl/openssl.c
===
--- php/php-src/trunk/ext/openssl/openssl.c 2012-02-22 23:42:18 UTC (rev 
323439)
+++ php/php-src/trunk/ext/openssl/openssl.c 2012-02-23 01:26:46 UTC (rev 
323440)
@@ -4799,6 +4799,10 @@

if (!(options  OPENSSL_RAW_DATA)) {
base64_str = (char*)php_base64_decode((unsigned char*)data, 
data_len, base64_str_len);
+   if (!base64_str) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Failed to 
base64 decode the input);
+   RETURN_FALSE;
+   }
data_len = base64_str_len;
data = base64_str;
}

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