NFS: Off-by-one length error in string handling

The hostname was getting truncated in the new text-based NFS mount API.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

authored by Chuck Lever and committed by Trond Myklebust 350c73af fdc6e2c8

+1 -1
+1 -1
fs/nfs/super.c
··· 1153 1153 c = strchr(dev_name, ':'); 1154 1154 if (c == NULL) 1155 1155 return -EINVAL; 1156 - len = c - dev_name - 1; 1156 + len = c - dev_name; 1157 1157 if (len > sizeof(data->hostname)) 1158 1158 return -EINVAL; 1159 1159 strncpy(data->hostname, dev_name, len);