aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jbd/commit.c
diff options
context:
space:
mode:
authorDan Carpenter <[email protected]>2010-07-13 11:34:59 +0000
committerTrond Myklebust <[email protected]>2010-07-30 19:33:39 +0000
commit674b2222920012244ca59978b356b25412a8dcc7 (patch)
tree01b3673031df1fb3b9a3f5c8f3394f1c0036dde6 /fs/jbd/commit.c
parentMerge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6 (diff)
downloadkernel-674b2222920012244ca59978b356b25412a8dcc7.tar.gz
kernel-674b2222920012244ca59978b356b25412a8dcc7.zip
nfs: include space for the NUL in root path
In root_nfs_name() it does the following: if (strlen(buf) + strlen(cp) > NFS_MAXPATHLEN) { printk(KERN_ERR "Root-NFS: Pathname for remote directory too long.\n"); return -1; } sprintf(nfs_export_path, buf, cp); In the original code if (strlen(buf) + strlen(cp) == NFS_MAXPATHLEN) then the sprintf() would lead to an overflow. Generally the rest of the code assumes that the path can have NFS_MAXPATHLEN (1024) characters and a NUL terminator so the fix is to add space to the nfs_export_path[] buffer. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
Diffstat (limited to 'fs/jbd/commit.c')
0 files changed, 0 insertions, 0 deletions