diff options
author | Sergey Kandaurov <pluknet@nginx.com> | 2019-09-23 11:56:31 +0000 |
---|---|---|
committer | Sergey Kandaurov <pluknet@nginx.com> | 2019-09-23 11:56:31 +0000 |
commit | c416933171810a85b4e4e8fa6778820e1746b003 (patch) | |
tree | 69245fdbcd3c5773db4727397284dda51d740f90 /src | |
parent | 5c50329f8edcbf3b56d9ffbc207eae64ca72e0fb (diff) | |
download | unit-c416933171810a85b4e4e8fa6778820e1746b003.tar.gz unit-c416933171810a85b4e4e8fa6778820e1746b003.tar.bz2 |
PHP: zeroing the whole file_handle structure.
Fixes segfaults with PHP 7.4.
Diffstat (limited to '')
-rw-r--r-- | src/nxt_php_sapi.c | 4 |
1 files 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); |