Skip to content

Commit

Permalink
Correctly reject bad tftp addresses earlier, rather than later.
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
vathpela committed Oct 2, 2014
1 parent 6a115d0 commit c0949c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion netboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit c0949c0

Please sign in to comment.