diff --git a/src/libnfdump/filter/grammar.y b/src/libnfdump/filter/grammar.y index 3f97ca9b..c4aac691 100755 --- a/src/libnfdump/filter/grammar.y +++ b/src/libnfdump/filter/grammar.y @@ -557,7 +557,8 @@ expr: term { $$ = $1.self; } %% -static char ebuf[512]; +#define EBUFFSIZE 512 +static char ebuf[EBUFFSIZE]; static void yyerror(char *msg) { if ( FilterFilename ) { @@ -568,7 +569,7 @@ static void yyerror(char *msg) { } /* End of */ #define yyprintf(...) do { \ - snprintf(ebuf, 255, __VA_ARGS__); \ + snprintf(ebuf, EBUFFSIZE, __VA_ARGS__); \ yyerror(ebuf); \ } while (0)