mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-02-17 22:49:02 +00:00
env: Don't match empty variable name in env_match()
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>
This commit is contained in:
parent
d1bca8d2a1
commit
6ba4473fb7
1 changed files with 1 additions and 1 deletions
|
@ -708,7 +708,7 @@ char *from_env(const char *envvar)
|
|||
|
||||
static const char *env_match(const char *p, const char *s1)
|
||||
{
|
||||
if (s1 == NULL)
|
||||
if (s1 == NULL || *s1 == '\0')
|
||||
return NULL;
|
||||
|
||||
while (*s1 == *p++)
|
||||
|
|
Loading…
Add table
Reference in a new issue