aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/nfs/super.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 9cd0828010cf..ef3643284f72 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -1153,7 +1153,7 @@ static int nfs_validate_mount_data(struct nfs_mount_data **options,
1153 c = strchr(dev_name, ':'); 1153 c = strchr(dev_name, ':');
1154 if (c == NULL) 1154 if (c == NULL)
1155 return -EINVAL; 1155 return -EINVAL;
1156 len = c - dev_name - 1; 1156 len = c - dev_name;
1157 if (len > sizeof(data->hostname)) 1157 if (len > sizeof(data->hostname))
1158 return -EINVAL; 1158 return -EINVAL;
1159 strncpy(data->hostname, dev_name, len); 1159 strncpy(data->hostname, dev_name, len);