From: Vladimir Serbinenko Date: Fri, 12 Feb 2016 11:34:54 +0000 (+0100) Subject: yylex: use grub_fatal for exit. X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=342d6edb970dd8af21feea3acf02905a5d117e38;p=grub2.git 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. --- 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 }