[php-src] Issue #8162: sapi_send_headers bug

From: Date: Wed, 02 Mar 2022 08:22:51 +0000
Subject: [php-src] Issue #8162: sapi_send_headers bug
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-240093@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/8162 Author: alexlongguo ### Description version:php 7.4.27 file: SAPI.c function: sapi_send_headers code: if (sapi_module.send_headers) { retval = sapi_module.send_headers(&SG(sapi_headers)); } else { retval = SAPI_HEADER_DO_SEND; } switch (retval) { case SAPI_HEADER_DO_SEND: { ...... sapi_module.send_header(&http_status_line, SG(server_context)); } describe: I didn't set sapi_module.send_headers in sapi_module_struct, so this function is NULL. retval = SAPI_HEADER_DO_SEND; But call sapi_module.send_header in this switch,it could cause crash. ### PHP Version php 7.4.27 ### Operating System _No response_

« previous php.bugs (#240093) next »