]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Fix NFS 'off by one' bug
authorTrond Myklebust <trond.myklebust@fys.uio.no>
Wed, 8 Jan 2003 01:59:30 +0000 (17:59 -0800)
committerTrond Myklebust <trond.myklebust@fys.uio.no>
Wed, 8 Jan 2003 01:59:30 +0000 (17:59 -0800)
 This fixes a bug that was found using the Stanford checker.

fs/nfs/inode.c

index e77e6eab9cc57b8059dc31d64d281c405e664c00..261a801edb1e2808d4117995e473c3b75d471368 100644 (file)
@@ -1440,7 +1440,7 @@ static struct super_block *nfs4_get_sb(struct file_system_type *fs_type,
        server->mnt_path = p;
 
        p = nfs_copy_user_string(server->ip_addr, &data->client_addr,
-                       sizeof(server->ip_addr));
+                       sizeof(server->ip_addr) - 1);
        if (IS_ERR(p))
                goto out_err;