mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-02 10:22:46 +00:00
This patch fixes a problem with 8-bit input to the ast_expr2 scanner.
The real culprit was the --full argument to flex in the Makefile! This causes a 7-bit scanner to be generated. I reviewed the rules and found one rule where I needed to specifically include 8-bit chars for a token. I tested against the text supplied by ibercom, and all looks very well. This has been there a surprisingly long time! (closes issue #14498) Reported by: ibercom Patches: 14498.patch uploaded by murf (license 17) Tested by: murf git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@177540 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -105,7 +105,7 @@ ast_expr2.c ast_expr2.h:
|
||||
bison -o $@ -d --name-prefix=ast_yy ast_expr2.y
|
||||
|
||||
ast_expr2f.c:
|
||||
flex -o $@ --full ast_expr2.fl # moved the correction of yyfree into the flex input file itself.
|
||||
flex -o $@ ast_expr2.fl # moved the correction of yyfree into the flex input file itself.
|
||||
sed 's@#if __STDC_VERSION__ >= 199901L@#if !defined __STDC_VERSION__ || __STDC_VERSION__ >= 199901L@' ast_expr2f.c > zz
|
||||
mv zz ast_expr2f.c
|
||||
|
||||
|
@@ -102,6 +102,8 @@ static char *expr2_token_subst(const char *mess);
|
||||
%option noyyfree
|
||||
%x var trail
|
||||
|
||||
HIBIT [\x80-\xff]
|
||||
|
||||
%%
|
||||
|
||||
\| { SET_COLUMNS; SET_STRING; return TOK_OR;}
|
||||
@@ -150,7 +152,7 @@ static char *expr2_token_subst(const char *mess);
|
||||
return TOKEN;
|
||||
}
|
||||
|
||||
[a-zA-Z0-9,.';\\_^$#@]+ {
|
||||
[a-zA-Z0-9,.';\\_^$#@{HIBIT}]+ {
|
||||
SET_COLUMNS;
|
||||
SET_STRING;
|
||||
return TOKEN;
|
||||
|
1210
main/ast_expr2f.c
1210
main/ast_expr2f.c
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user