bug fix: allow space for 'tcp6' in server addrs

server_addrs_add() was using StringCchCopyA() with len=4, which truncates 'tcp6' to 'tcp\0'

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
Casey Bodley 2011-07-21 11:48:41 -04:00 committed by unknown
parent 64cce65b77
commit d8048049d7

View file

@ -189,9 +189,9 @@ static void server_addrs_add(
} else { } else {
/* overwrite the address at 'next_index' */ /* overwrite the address at 'next_index' */
StringCchCopyA(addrs->addrs.arr[addrs->next_index].netid, StringCchCopyA(addrs->addrs.arr[addrs->next_index].netid,
NFS41_NETWORK_ID_LEN, addr->netid); NFS41_NETWORK_ID_LEN+1, addr->netid);
StringCchCopyA(addrs->addrs.arr[addrs->next_index].uaddr, StringCchCopyA(addrs->addrs.arr[addrs->next_index].uaddr,
NFS41_UNIVERSAL_ADDR_LEN, addr->uaddr); NFS41_UNIVERSAL_ADDR_LEN+1, addr->uaddr);
/* increment/wrap next_index */ /* increment/wrap next_index */
addrs->next_index = (addrs->next_index + 1) % NFS41_ADDRS_PER_SERVER; addrs->next_index = (addrs->next_index + 1) % NFS41_ADDRS_PER_SERVER;