]> granicus.if.org Git - php/commitdiff
Fixed a problem in the configuration scanner where two extra NULL bytes
authorAlexander Feldman <sasha@php.net>
Wed, 11 Oct 2000 19:38:16 +0000 (19:38 +0000)
committerAlexander Feldman <sasha@php.net>
Wed, 11 Oct 2000 19:38:16 +0000 (19:38 +0000)
were added to each encapsulated string.

NEWS
main/configuration-scanner.l

diff --git a/NEWS b/NEWS
index 7d26ae60c207ea24a670494c955782a7289ac9ff..a442173d78a8bda2edcdaaf19ada55a0b642e687 100644 (file)
--- 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
index 4958e7246e74b7b5dc384dfd0bf9f013ca7b73b4..4e90739d21c3e6bcd6f9dccc8088f1b15714fbfe 100644 (file)
@@ -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;
 }