]> git.tue.mpg.de Git - lopsub.git/commit
Don't print invalid line numbers in error messages.
authorAndre Noll <maan@tuebingen.mpg.de>
Tue, 31 Oct 2023 19:52:06 +0000 (20:52 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Tue, 7 Nov 2023 14:04:13 +0000 (15:04 +0100)
commit7cc5bb8c56295d91f2bd45c10d483dedebe79c97
treeb505374c3b73fffc90fcdfa7d5cbd2bc70129863
parent94ee4f0831ad0c3de5eabd821a8bd42c86571a30
Don't print invalid line numbers in error messages.

If yylex() fails, yyget_lineno() should not be called because it
accesses uninitialized memory:

==23686== Use of uninitialised value of size 4
==23686==    at 0x46FA85D: _itoa_word (_itoa.c:178)
==23686==    by 0x4704E14: __printf_buffer (vfprintf-process-arg.c:155)
==23686==    by 0x471B91C: __vsprintf_internal (iovsprintf.c:62)
==23686==    by 0x47010DD: sprintf (sprintf.c:30)
==23686==    by 0x45A019F: lls_convert_config (config_file.l:272)
==23686==    by 0x804F0BA: parse_options (misma.c:741)
==23686==    by 0x804A879: main (misma.c:1529)

Just omit printing the line number for now.
config_file.l