From c416933171810a85b4e4e8fa6778820e1746b003 Mon Sep 17 00:00:00 2001 From: Sergey Kandaurov Date: Mon, 23 Sep 2019 11:56:31 +0000 Subject: PHP: zeroing the whole file_handle structure. Fixes segfaults with PHP 7.4. --- src/nxt_php_sapi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nxt_php_sapi.c b/src/nxt_php_sapi.c index f5f115f5..7a5e0a3b 100644 --- a/src/nxt_php_sapi.c +++ b/src/nxt_php_sapi.c @@ -668,10 +668,10 @@ nxt_php_request_handler(nxt_unit_request_info_t *req) SG(request_info).path_translated = NULL; + nxt_memzero(&file_handle, sizeof(file_handle)); + file_handle.type = ZEND_HANDLE_FILENAME; file_handle.filename = (char *) ctx->script_filename.start; - file_handle.free_filename = 0; - file_handle.opened_path = NULL; nxt_unit_req_debug(req, "handle.filename = '%s'", ctx->script_filename.start); -- cgit