com php-src: Fix bug #66182 exit in stream filter pr oduces segfault: NEWS ext/standard/user_filters.c

From: Date: Thu, 03 Apr 2014 07:07:35 +0000
Subject: com php-src: Fix bug #66182 exit in stream filter pr oduces segfault: NEWS ext/standard/user_filters.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-76691@lists.php.net to get a copy of this message
Commit: 7ab5c593f77b229210a88d436270707f74b22b78 Author: Michael Wallner <mike@php.net> Thu, 3 Apr 2014 09:07:35 +0200 Parents: 1ec83d44a1601c3560f430e08af9698bf8fb075c Branches: PHP-5.4 PHP-5.5 PHP-5.6 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=7ab5c593f77b229210a88d436270707f74b22b78 Log: Fix bug #66182 exit in stream filter produces segfault Unfortunately, a segv caused by exit cannot be tested reliably. Bugs: https://bugs.php.net/66182 Changed paths: M NEWS M ext/standard/user_filters.c Diff: diff --git a/NEWS b/NEWS index bc329ad..bf3fa0c 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,7 @@ PHP NEWS . Fixed bug #61019 (Out of memory on command stream_get_contents). (Mike) . Fixed bug #64330 (stream_socket_server() creates wrong Abstract Namespace UNIX sockets). (Mike) + . Fixed bug #66182 (exit in stream filter produces segfault). (Mike) - Embed: . Fixed bug #65715 (php5embed.lib isn't provided anymore). (Anatol) diff --git a/ext/standard/user_filters.c b/ext/standard/user_filters.c index 29a4c70..6512718 100644 --- a/ext/standard/user_filters.c +++ b/ext/standard/user_filters.c @@ -180,6 +180,11 @@ php_stream_filter_status_t userfilter_filter( zval zpropname; int call_result; + /* the userfilter object probably doesn't exist anymore */ + if (CG(unclean_shutdown)) { + return ret; + } + if (FAILURE == zend_hash_find(Z_OBJPROP_P(obj), "stream", sizeof("stream"), (void**)&zstream)) { /* Give the userfilter class a hook back to the stream */ ALLOC_INIT_ZVAL(zstream);

« previous php.cvs (#76691) next »