Skip to content

Commit

Permalink
Fix ebuff size
Browse files Browse the repository at this point in the history
  • Loading branch information
phaag committed Jul 20, 2024
1 parent ad70a1f commit 0577dee
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/libnfdump/filter/grammar.y
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand All @@ -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)

Expand Down

0 comments on commit 0577dee

Please sign in to comment.