mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 07:04:28 +00:00
net: ipv6: Fixed IPv6 string to address conversion off-by-one error
One extra character was being checked in the IPv6 string which caused the last character of the address to be neither '\0' nor ':'. This raises an error condition and causes the function to always return an error. This issue was resolved by this fix. Signed-off-by: Ehsan Mohandesi <emohandesi@microsoft.com> Reviewed-by: Viacheslav Mitrofanov <v.v.mitrofanov@yadro.com>
This commit is contained in:
parent
796e549822
commit
7db25d99b2
1 changed files with 1 additions and 1 deletions
|
@ -845,7 +845,7 @@ void tftp_start(enum proto_t protocol)
|
|||
e = strchr(net_boot_file_name, ']');
|
||||
len = e - s;
|
||||
if (s && e) {
|
||||
string_to_ip6(s + 1, len, &tftp_remote_ip6);
|
||||
string_to_ip6(s + 1, len - 1, &tftp_remote_ip6);
|
||||
strlcpy(tftp_filename, e + 2, MAX_LEN);
|
||||
} else {
|
||||
strlcpy(tftp_filename, net_boot_file_name, MAX_LEN);
|
||||
|
|
Loading…
Reference in a new issue