diff --git a/fs/nfs/super.c b/fs/nfs/super.c index 9cd0828010cff7a7e41f4438af6f62593a3513cf..ef3643284f72eaff73c1bccedf5ba17f5004cb90 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, c = strchr(dev_name, ':'); if (c == NULL) return -EINVAL; - len = c - dev_name - 1; + len = c - dev_name; if (len > sizeof(data->hostname)) return -EINVAL; strncpy(data->hostname, dev_name, len);