From 32ae7160377e9548dcf27ff3e0e75c3c9cd3c36c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20Magalh=C3=A3es?= Date: Wed, 16 Jan 2019 00:33:03 +0000 Subject: Fixed bug #76675 Leave a reference to the resource in the php_curl. --- ext/curl/multi.c | 1 + ext/curl/tests/bug76675.phpt | 53 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 ext/curl/tests/bug76675.phpt (limited to 'ext/curl') 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+)+ -- cgit v1.2.1