From 159609ee4eab766673606f5a4e122c78dea390b3 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Thu, 2 Oct 2014 01:01:54 -0400 Subject: 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 --- netboot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'netboot.c') 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; } -- cgit v1.2.3