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.
This commit is contained in:
Steve Langasek 2013-09-20 17:06:33 -05:00 committed by Peter Jones
parent 37b87f8e03
commit e4642cca38

View File

@ -251,7 +251,7 @@ static BOOLEAN extract_tftp_info(char *url)
return FALSE; return FALSE;
} }
memset(ip6str, 0, 128); memset(ip6str, 0, 128);
memcpy(ip6str, start, end + 1 - start); memcpy(ip6str, start, end - start);
end++; end++;
memcpy(&tftp_addr.v6, str2ip6(ip6str), 16); memcpy(&tftp_addr.v6, str2ip6(ip6str), 16);
full_path = AllocateZeroPool(strlen(end)+strlen(template)+1); full_path = AllocateZeroPool(strlen(end)+strlen(template)+1);