diff options
author | Bob Weinand <bobwei9@hotmail.com> | 2015-08-03 20:27:46 +0200 |
---|---|---|
committer | Bob Weinand <bobwei9@hotmail.com> | 2015-08-03 20:27:46 +0200 |
commit | b5e16cebda52b25f651b97c9b9da830ee7e46138 (patch) | |
tree | 6560068aa8fdc51aa72754d1e5e3b11c5253adab /sapi/phpdbg/phpdbg_lexer.l | |
parent | 34596a3dddb407fc36af7cdf9da55253210da5e1 (diff) | |
download | php-git-b5e16cebda52b25f651b97c9b9da830ee7e46138.tar.gz |
Fix a few valgrind errors in phpdbg
Diffstat (limited to 'sapi/phpdbg/phpdbg_lexer.l')
-rw-r--r-- | sapi/phpdbg/phpdbg_lexer.l | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sapi/phpdbg/phpdbg_lexer.l b/sapi/phpdbg/phpdbg_lexer.l index 35ca744400..197773e2c6 100644 --- a/sapi/phpdbg/phpdbg_lexer.l +++ b/sapi/phpdbg/phpdbg_lexer.l @@ -57,7 +57,7 @@ T_SHELL 'sh' T_IF 'if' T_RUN 'run' T_RUN_SHORT "r" -WS [ \r\n\t]+ +WS [ \r\t]+ DIGITS [-]?[0-9\.]+ ID [^ \r\n\t:#\000]+ GENERIC_ID ([^ \r\n\t:#\000]|":\\")+ @@ -67,7 +67,7 @@ INPUT [^\n\000]+ <!*> := yyleng = (size_t) YYCURSOR - (size_t) yytext; -<*>{WS}?[\n\000] { +<*>[\n\000] { return 0; } @@ -96,7 +96,7 @@ INPUT [^\n\000]+ <NORMAL>{ID}"://" { phpdbg_init_param(yylval, STR_PARAM); - yylval->str = zend_strndup(yytext, yyleng); + yylval->str = estrndup(yytext, yyleng); yylval->len = yyleng; return T_PROTO; } @@ -127,21 +127,21 @@ INPUT [^\n\000]+ <NORMAL>{OPCODE} { phpdbg_init_param(yylval, OP_PARAM); - yylval->str = zend_strndup(yytext, yyleng); + yylval->str = estrndup(yytext, yyleng); yylval->len = yyleng; return T_OPCODE; } <NORMAL>{GENERIC_ID} { phpdbg_init_param(yylval, STR_PARAM); - yylval->str = zend_strndup(yytext, yyleng); + yylval->str = estrndup(yytext, yyleng); yylval->len = yyleng; return T_ID; } <RAW>{INPUT} { phpdbg_init_param(yylval, STR_PARAM); - yylval->str = zend_strndup(yytext, yyleng); + yylval->str = estrndup(yytext, yyleng); yylval->len = yyleng; return T_INPUT; } |