Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=350c73af6af51ae7654dad91874c0d30dd13bbbe
Commit:     350c73af6af51ae7654dad91874c0d30dd13bbbe
Parent:     fdc6e2c8c0dc0ac702fca0b802f5d9ae99a54bb6
Author:     Chuck Lever <[EMAIL PROTECTED]>
AuthorDate: Wed Aug 29 17:59:01 2007 -0400
Committer:  Trond Myklebust <[EMAIL PROTECTED]>
CommitDate: Sat Sep 1 10:14:40 2007 -0400

    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 <[EMAIL PROTECTED]>
    Signed-off-by: Trond Myklebust <[EMAIL PROTECTED]>
---
 fs/nfs/super.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 9cd0828..ef36432 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);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to