From be95a4fe2951374676efc9454ffee8638faaf68d Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Tue, 28 Jul 2020 18:51:30 +0200 Subject: scanner: don't crash on strings containing a NUL byte We crash if the input contains a string containing a NUL byte. Reported by Suhwan Song. https://lists.gnu.org/r/bug-bison/2020-07/msg00051.html * src/flex-scanner.h (STRING_FREE): Avoid accidental use of last_string. * src/scan-gram.l: Don't call STRING_FREE without calling STRING_FINISH first. * tests/input.at (Invalid inputs): Check that case. --- THANKS | 1 + 1 file changed, 1 insertion(+) (limited to 'THANKS') diff --git a/THANKS b/THANKS index ac073ea6..5c64da3c 100644 --- a/THANKS +++ b/THANKS @@ -185,6 +185,7 @@ Simon Sobisch simonsobisch@web.de Stefano Lattarini stefano.lattarini@gmail.com Stephen Cameron stephenmcameron@gmail.com Steve Murphy murf@parsetree.com +Suhwan Song prada960808@gmail.com Sum Wu sum@geekhouse.org Théophile Ranquet theophile.ranquet@gmail.com Thiru Ramakrishnan thiru.ramakrishnan@gmail.com -- cgit v1.2.1