projects
/
platform
/
kernel
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d1bca8d
)
env: Don't match empty variable name in env_match()
author
Marek Behún
<marek.behun@nic.cz>
Sun, 17 Oct 2021 15:36:33 +0000
(17:36 +0200)
committer
Simon Glass
<sjg@chromium.org>
Thu, 21 Oct 2021 18:50:48 +0000
(12:50 -0600)
Do we really allow zero-length variable name? I guess not.
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Simon Glass <sjg@chromium.org>
cmd/nvedit.c
patch
|
blob
|
history
diff --git
a/cmd/nvedit.c
b/cmd/nvedit.c
index
5b1d4c2
..
8d53579
100644
(file)
--- a/
cmd/nvedit.c
+++ b/
cmd/nvedit.c
@@
-708,7
+708,7
@@
char *from_env(const char *envvar)
static const char *env_match(const char *p, const char *s1)
{
static const char *env_match(const char *p, const char *s1)
{
- if (s1 == NULL)
+ if (s1 == NULL
|| *s1 == '\0'
)
return NULL;
while (*s1 == *p++)
return NULL;
while (*s1 == *p++)