From: Pedro Magalhães Date: Wed, 16 Jan 2019 00:33:03 +0000 (+0000) Subject: Fixed bug #76675 X-Git-Tag: php-7.3.2RC1~11^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=32ae7160377e9548dcf27ff3e0e75c3c9cd3c36c;p=php Fixed bug #76675 Leave a reference to the resource in the php_curl. --- diff --git a/NEWS b/NEWS index 967afa21a0..d337e7f3c8 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,9 @@ PHP NEWS - Core: . Fixed bug #77339 (__callStatic may get incorrect arguments). (Dmitry) +- Curl: + . Fixed bug #76675 (Segfault with H2 server push). (Pedro Magalhães) + - GD: . Fixed bug #73281 (imagescale(…, IMG_BILINEAR_FIXED) can cause black border). (cmb) diff --git a/ext/curl/multi.c b/ext/curl/multi.c index 3afe8ac413..073a6b3688 100644 --- a/ext/curl/multi.c +++ b/ext/curl/multi.c @@ -509,6 +509,7 @@ static int _php_server_push_callback(CURL *parent_ch, CURL *easy, size_t num_hea Z_ADDREF_P(pz_parent_ch); res = zend_register_resource(ch, le_curl); + ch->res = res; ZVAL_RES(&pz_ch, res); size_t i; diff --git a/ext/curl/tests/bug76675.phpt b/ext/curl/tests/bug76675.phpt new file mode 100644 index 0000000000..5e60c5c47f --- /dev/null +++ b/ext/curl/tests/bug76675.phpt @@ -0,0 +1,53 @@ +--TEST-- +Bug #76675 (Segfault with H2 server push write/writeheader handlers) +--SKIPIF-- + +--FILE-- + +--EXPECTREGEX-- +(Received \d+)+