Commit 159609ee authored by Peter Jones's avatar Peter Jones

Correctly reject bad tftp addresses earlier, rather than later.

This check is for end == NULL but was meant to be *end == '\0'.  Without
this change, we'll pass a plausibly bad address (i.e. one with no ']' at
the end) to Mtftp(... READ_FILE ...), which should fail correctly, but
our error messaging will be inconsistent.
Signed-off-by: default avatarPeter Jones <pjones@redhat.com>
parent 7d953d67
......@@ -234,7 +234,7 @@ static BOOLEAN extract_tftp_info(CHAR8 *url)
return FALSE;
}
}
if (end == '\0') {
if (*end == '\0') {
Print(L"TFTP SERVER MUST BE ENCLOSED IN [..]\n");
return FALSE;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment