summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Feldman <sasha@php.net>2000-10-11 19:38:16 +0000
committerAlexander Feldman <sasha@php.net>2000-10-11 19:38:16 +0000
commitaee3c65a8f58cedef14d1397c742ade93b4a79bc (patch)
treea76c4639272f46d804a84f27c2718638eb17896c
parente9887156cf52b1ba8fa1f9ec440f8dda3913ac7a (diff)
downloadphp-git-aee3c65a8f58cedef14d1397c742ade93b4a79bc.tar.gz
Fixed a problem in the configuration scanner where two extra NULL bytes
were added to each encapsulated string.
-rw-r--r--NEWS2
-rw-r--r--main/configuration-scanner.l4
2 files changed, 4 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 7d26ae60c2..a442173d78 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,8 @@ PHP 4.0 NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
11 Oct 2000, Version 4.0.3
+- Fixed a problem in the configuration parser (two null bytes were added
+ to each ENCAPSULATED TC_STRING) (alex@zend.com)
- Fixed a possible crash in -a interactive mode (Zeev, Zend Engine)
- Added mysql_escape_string() (Peter A. Savitch and & Brian Wang)
- Fixed many possible crash bugs with improper use of the printf() family of
diff --git a/main/configuration-scanner.l b/main/configuration-scanner.l
index 4958e7246e..4e90739d21 100644
--- a/main/configuration-scanner.l
+++ b/main/configuration-scanner.l
@@ -113,8 +113,8 @@ void init_cfg_scanner()
/* eat leading " */
yytext++;
- cfglval->value.str.val = zend_strndup(yytext,yyleng);
- cfglval->value.str.len = yyleng;
+ cfglval->value.str.val = zend_strndup(yytext, yyleng - 2);
+ cfglval->value.str.len = yyleng - 2;
cfglval->type = IS_STRING;
return TC_ENCAPSULATED_STRING;
}