summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/cmd_nvedit.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c
index d655ab9..1f9c674 100644
--- a/common/cmd_nvedit.c
+++ b/common/cmd_nvedit.c
@@ -650,6 +650,9 @@ U_BOOT_CMD(
*/
int envmatch(uchar *s1, int i2)
{
+ if (s1 == NULL)
+ return -1;
+
while (*s1 == env_get_char(i2++))
if (*s1++ == '=')
return i2;