Merge branch 'PHP-7.4'

This commit is contained in:
George Wang 2020-07-23 16:08:54 -04:00
commit 78fc12a37a
3 changed files with 234 additions and 14 deletions

View file

@ -52,7 +52,7 @@
#include "lscriu.c"
#endif
#define SAPI_LSAPI_MAX_HEADER_LENGTH 2048
#define SAPI_LSAPI_MAX_HEADER_LENGTH LSAPI_RESP_HTTP_HEADER_MAX
/* Key for each cache entry is dirname(PATH_TRANSLATED).
*
@ -591,7 +591,7 @@ static int sapi_lsapi_activate()
static sapi_module_struct lsapi_sapi_module =
{
"litespeed",
"LiteSpeed V7.6",
"LiteSpeed V7.7",
php_lsapi_startup, /* startup */
php_module_shutdown_wrapper, /* shutdown */
@ -1705,7 +1705,7 @@ PHP_FUNCTION(litespeed_response_headers)
if ( h->header_len > 0 ) {
p = strchr( h->header, ':' );
len = p - h->header;
if (( p )&&( len > 0 )) {
if (p && len > 0 && len < LSAPI_RESP_HTTP_HEADER_MAX) {
memmove( headerBuf, h->header, len );
while( len > 0 && (isspace( headerBuf[len-1])) ) {
--len;