Blame SOURCES/0074-Correctly-reject-bad-tftp-addresses-earlier-rather-t.patch

4210fa
From c0949c0a7916e81767ab35f67005b80cfb565e2c Mon Sep 17 00:00:00 2001
4210fa
From: Peter Jones <pjones@redhat.com>
4210fa
Date: Sun, 21 Sep 2014 15:19:34 -0400
4210fa
Subject: [PATCH 74/74] Correctly reject bad tftp addresses earlier, rather
4210fa
 than later.
4210fa
4210fa
This check is for end == NULL but was meant to be *end == '\0'.  Without
4210fa
this change, we'll pass a plausibly bad address (i.e. one with no ']' at
4210fa
the end) to Mtftp(... READ_FILE ...), which should fail correctly, but
4210fa
our error messaging will be inconsistent.
4210fa
4210fa
Signed-off-by: Peter Jones <pjones@redhat.com>
4210fa
---
4210fa
 netboot.c | 2 +-
4210fa
 1 file changed, 1 insertion(+), 1 deletion(-)
4210fa
4210fa
diff --git a/netboot.c b/netboot.c
4210fa
index f884cba..ad5d37e 100644
4210fa
--- a/netboot.c
4210fa
+++ b/netboot.c
4210fa
@@ -234,7 +234,7 @@ static BOOLEAN extract_tftp_info(CHAR8 *url)
4210fa
 			return FALSE;
4210fa
 		}
4210fa
 	}
4210fa
-	if (end == '\0') {
4210fa
+	if (*end == '\0') {
4210fa
 		Print(L"TFTP SERVER MUST BE ENCLOSED IN [..]\n");
4210fa
 		return FALSE;
4210fa
 	}
4210fa
-- 
4210fa
1.9.3
4210fa