libtracefs: my_yyinput() should return 0 when no data can be read
YY_INPUT() is redefined in sqlhist.l and basically just call
my_yyinput() to do the work. However, YY_INPUT is supposed to return
YY_NULL (0 on Unix system) when no data can be read, not -1. This can
cause an overflow error in the generated sqlhist-lex.c file.
Have my_yyinput() returns zero when no buffer is found.
Link: https://lore.kernel.org/linux-trace-devel/[email protected]
Fixes: 25446407c5151 ("libtracefs: Added new API tracefs_sql()")
Signed-off-by: Jerome Marchand <[email protected]>
Signed-off-by: Steven Rostedt (Google) <[email protected]>
1 file changed