summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Langasek <steve.langasek@canonical.com>2013-09-20 17:06:33 -0500
committerPeter Jones <pjones@redhat.com>2013-09-24 12:05:31 -0400
commite4642cca3869e017f35a7e662adb28d8957b9bbb (patch)
treedfe5dd965d2536dc578a364038e938e97d080996
parent37b87f8e035f85ff4a077b6593228d232cab3616 (diff)
downloadefi-boot-shim-e4642cca3869e017f35a7e662adb28d8957b9bbb.tar.gz
efi-boot-shim-e4642cca3869e017f35a7e662adb28d8957b9bbb.zip
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.
-rw-r--r--netboot.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/netboot.c b/netboot.c
index a10b2614..e5433639 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);