From 342d6edb970dd8af21feea3acf02905a5d117e38 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Fri, 12 Feb 2016 12:34:54 +0100 Subject: [PATCH] yylex: use grub_fatal for exit. lexer calls yylex_fatal on fatal internal errors. yylex_fatal itself is declared as noreturn and calls exit. Returning from noreturn function has unpredictable consequences. --- grub-core/script/yylex.l | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grub-core/script/yylex.l b/grub-core/script/yylex.l index 9c2cfe115..95b219170 100644 --- a/grub-core/script/yylex.l +++ b/grub-core/script/yylex.l @@ -92,7 +92,7 @@ typedef size_t yy_size_t; #define stdout 0 #define fprintf(...) 0 -#define exit(...) +#define exit(...) grub_fatal("fatal error in lexer") #endif }