]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
cifs: Fix buffer size for tcon->nativeFileSystem field
authorJeff Layton <jlayton@redhat.com>
Sat, 9 May 2009 05:49:05 +0000 (11:19 +0530)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 20 May 2009 05:20:10 +0000 (22:20 -0700)
commitb26a2233617941def73064bee3fffb97ab6f073b
treebc1ba1d9273802486a6bf0b5e7601bacccb440cd
parent71cf4edb1d866d69773bce35f9761d1973b671c9
cifs: Fix buffer size for tcon->nativeFileSystem field

Commit f083def68f84b04fe3f97312498911afce79609e refreshed.

cifs: fix buffer size for tcon->nativeFileSystem field

The buffer for this was resized recently to fix a bug. It's still
possible however that a malicious server could overflow this field
by sending characters in it that are >2 bytes in the local charset.
Double the size of the buffer to account for this possibility.

Also get rid of some really strange and seemingly pointless NULL
termination. It's NULL terminating the string in the source buffer,
but by the time that happens, we've already copied the string.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Cc: Suresh Jayaraman <sjayaraman@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/cifs/connect.c