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: Peter Jones <pjones@redhat.com>
This commit is contained in:
Peter Jones 2014-09-21 15:19:34 -04:00
parent 6a115d038a
commit c0949c0a79

View File

@ -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;
}