From e4642cca3869e017f35a7e662adb28d8957b9bbb Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Fri, 20 Sep 2013 17:06:33 -0500 Subject: [PATCH] Fix an off-by-one error We don't need to add one because our end pointer is already off the end of the string we want to copy. --- netboot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netboot.c b/netboot.c index a10b261..e543363 100644 --- a/netboot.c +++ b/netboot.c @@ -251,7 +251,7 @@ static BOOLEAN extract_tftp_info(char *url) return FALSE; } memset(ip6str, 0, 128); - memcpy(ip6str, start, end + 1 - start); + memcpy(ip6str, start, end - start); end++; memcpy(&tftp_addr.v6, str2ip6(ip6str), 16); full_path = AllocateZeroPool(strlen(end)+strlen(template)+1);