php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login

Patch raw-ini-scanner-segfault for Filesystem function related Bug #69551

Patch version 2015-04-30 16:40 UTC

Return to Bug #69551 | Download this patch
Patch Revisions:

Developer: cmb@php.net

 Zend/zend_ini_scanner.l | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Zend/zend_ini_scanner.l b/Zend/zend_ini_scanner.l
index c82d793..8cc7266 100644
--- a/Zend/zend_ini_scanner.l
+++ b/Zend/zend_ini_scanner.l
@@ -524,7 +524,7 @@ end_raw_value_chars:
 	}
 
 	/* Eat leading and trailing double quotes */
-	if (yytext[0] == '"' && yytext[yyleng - 1] == '"') {
+	if (yyleng > 1 && yytext[0] == '"' && yytext[yyleng - 1] == '"') {
 		SCNG(yy_text)++;
 		yyleng = yyleng - 2;
 	} else if (sc) {
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Fri Oct 30 08:01:25 2020 UTC