]> git.ipfire.org Git - thirdparty/grub.git/commit
script: Do not allow a delimiter between function name and block start
authorGlenn Washburn <development@efficientek.com>
Fri, 31 Jul 2020 14:33:22 +0000 (09:33 -0500)
committerDaniel Kiper <daniel.kiper@oracle.com>
Fri, 18 Sep 2020 20:31:30 +0000 (22:31 +0200)
commitac301e4dd0dabbb718aebf458ae8ce962078d0fe
treea198d1d11ba819a51f0b92a27a9481ceba7af735
parentc30f378e00d3fde86de9fc48f4ec5a3d2a62fdea
script: Do not allow a delimiter between function name and block start

Currently the following is valid syntax but should be a syntax error:

  grub> function f; { echo HERE; }
  grub> f
  HERE

This fix is not backward compatible, but current syntax is not documented
either and has no functional value. So any scripts with this unintended
syntax are technically syntactically incorrect and should not be relying
on this behavior.

Signed-off-by: Glenn Washburn <development@efficientek.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/script/parser.y