mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-31 14:23:49 +01:00
genksyms: Fix segfault with invalid declarations
Do not try to recover too early and segfault when parsing invalid declarations such as echo 'int (int);' | scripts/genksyms/genksyms echo 'int a, (int);' | scripts/genksyms/genksyms echo 'extern void *__inline_memcpy((void *), (const void *), (__kernel_size_t));' | scripts/genksyms/genksyms The last one was a real-life bug with include/asm-generic/asm-prototypes.h on x86_64. Reported-and-tested-by: Borislav Petkov <[email protected]> Signed-off-by: Michal Marek <[email protected]>
This commit is contained in:
1 parent
7ce7d89f48
commit
d920f7c662
1 file changed
-2
@@ -322,8 +322,6 @@ direct_declarator:
|
||||
{ $$ = $2; }
|
||||
| '(' declarator ')'
|
||||
{ $$ = $3; }
|
||||
| '(' error ')'
|
||||
{ $$ = $3; }
|
||||
;
|
||||
|
||||
/* Nested declarators differ from regular declarators in that they do
|
||||
|
||||
Reference in new issue
Block a user