summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Jones <pjones@redhat.com>2014-10-02 01:01:54 -0400
committerPeter Jones <pjones@redhat.com>2014-10-02 01:01:54 -0400
commit159609ee4eab766673606f5a4e122c78dea390b3 (patch)
tree021cc8bff63dc217ef9328ca7a7bcc1c3c2b31b1
parent7d953d6722ee9d2d1e21104bae41d60629332140 (diff)
downloadefi-boot-shim-159609ee4eab766673606f5a4e122c78dea390b3.tar.gz
efi-boot-shim-159609ee4eab766673606f5a4e122c78dea390b3.zip
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>
-rw-r--r--netboot.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/netboot.c b/netboot.c
index f884cba2..ad5d37e9 100644
--- a/netboot.c
+++ b/netboot.c
@@ -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;
}