From: Francis Laniel <francis.laniel@amarulasolutions.com>
To: Wolfgang Denk <wd@denx.de>
Cc: u-boot@lists.denx.de, joe.hershberger@ni.com,
michael@amarulasolutions.com, ondrej@amarulasolutions.com
Subject: Re: [RFC PATCH v2 1/1] cmd: nvedit: Forbid key to be empty.
Date: Wed, 30 Jun 2021 09:45:41 +0200 [thread overview]
Message-ID: <2586149.mvXUDI8C0e@pwmachine> (raw)
In-Reply-To: <138836.1625038696@gemini.denx.de>
Hi.
Le mercredi 30 juin 2021, 09:38:16 CEST Wolfgang Denk a écrit :
> Dear Francis Laniel,
>
> In message <20210629161859.298630-2-francis.laniel@amarulasolutions.com> you
wrote:
> > Before this patch, it was possible to do the following using setenv:
> > setenv '' foo
> > Then, on next reboot, U-Boot will not be able to parse environment due to
> > it having:
> > =foo
> >
> > Now, if the above command is given, an error message is thrown and
> > environment is not modified.
> >
> > Signed-off-by: Francis Laniel <francis.laniel@amarulasolutions.com>
> > ---
> >
> > cmd/nvedit.c | 5 +++++
> > 1 file changed, 5 insertions(+)
> >
> > diff --git a/cmd/nvedit.c b/cmd/nvedit.c
> > index d14ba10cef..6f99a85a9c 100644
> > --- a/cmd/nvedit.c
> > +++ b/cmd/nvedit.c
> > @@ -262,6 +262,11 @@ static int _do_env_set(int flag, int argc, char
> > *const argv[], int env_flag)>
> > return 1;
> >
> > }
> >
> > + if (*name == '\0') {
> > + printf("## Error: variable name must no be empty\n");
> > + return 1;
> > + }
> > +
> >
> > env_id++;
> >
> > /* Delete only ? */
>
> Reviewed-by: Wolfgang Denk <wd@denx.de>
Thank you for the review!
>
> Best regards,
>
> Wolfgang Denk
prev parent reply other threads:[~2021-06-30 7:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-29 16:18 [RFC PATCH v2 0/1] cmd: nvedit: Forbid environment key to be empty Francis Laniel
2021-06-29 16:18 ` [RFC PATCH v2 1/1] cmd: nvedit: Forbid " Francis Laniel
2021-06-30 7:38 ` Wolfgang Denk
2021-06-30 7:45 ` Francis Laniel [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2586149.mvXUDI8C0e@pwmachine \
--to=francis.laniel@amarulasolutions.com \
--cc=joe.hershberger@ni.com \
--cc=michael@amarulasolutions.com \
--cc=ondrej@amarulasolutions.com \
--cc=u-boot@lists.denx.de \
--cc=wd@denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.