com php-src: Fixed runtime php.ini override, ini name length is off by 1.: sapi/litespeed/lsapi_main.c

From: Date: Thu, 19 Nov 2015 22:01:26 +0000
Subject: com php-src: Fixed runtime php.ini override, ini name length is off by 1.: sapi/litespeed/lsapi_main.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-89910@lists.php.net to get a copy of this message
Commit: 5bcb7a7019a49c2f80eda7d2aa947efebeee0034 Author: George Wang <gwang@php.net> Thu, 19 Nov 2015 17:01:26 -0500 Parents: d6308afce9b74280f8c0085424bdee69accfebd3 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=5bcb7a7019a49c2f80eda7d2aa947efebeee0034 Log: Fixed runtime php.ini override, ini name length is off by 1. Changed paths: M sapi/litespeed/lsapi_main.c Diff: diff --git a/sapi/litespeed/lsapi_main.c b/sapi/litespeed/lsapi_main.c index 13bca0c..a296261 100644 --- a/sapi/litespeed/lsapi_main..c +++ b/sapi/litespeed/lsapi_main.c @@ -602,11 +602,12 @@ static int alter_ini( const char * pKey, int keyLen, const char * pValue, int va else { #if PHP_MAJOR_VERSION >= 7 - psKey = zend_string_init(pKey, keyLen, 1); + --keyLen; + psKey = zend_string_init(pKey, keyLen, 1); zend_alter_ini_entry_chars(psKey, (char *)pValue, valLen, type, PHP_INI_STAGE_ACTIVATE); - zend_string_release(psKey); + zend_string_release(psKey); #else zend_alter_ini_entry((char *)pKey, keyLen, (char *)pValue, valLen,

« previous php.cvs (#89910) next »