On Wed, Jan 16, 2019 at 01:34:41PM -0500, Prarit Bhargava wrote: > It is possible to execute 'grub-editenv - set ="some data"', > which results in an unremoveable entry > > ="some data"
Please explain why it happens. > Verify the variable has a size before setting a value. s/variable/argument/ s/size/size greater than zero/ > Signed-off-by: Prarit Bhargava <pra...@redhat.com> > Cc: mleit...@redhat.com > Cc: pjo...@redhat.com > Cc: javi...@redhat.com > Cc: ar...@redhat.com > Cc: Daniel Kiper <dki...@net-space.pl> > --- > util/grub-editenv.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/util/grub-editenv.c b/util/grub-editenv.c > index 118e89fe57fe..0b6c69b9688c 100644 > --- a/util/grub-editenv.c > +++ b/util/grub-editenv.c > @@ -217,6 +217,9 @@ set_variables (const char *name, int argc, char *argv[]) > > *(p++) = 0; > > + if (! grub_strlen(argv[0])) > + grub_util_error (_("No parameter specified")); s/parameter/argument/ Daniel _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel