diff options
author | Chen Gang <gang.chen@asianux.com> | 2013-07-19 03:01:36 +0200 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2013-07-31 06:54:40 +0200 |
commit | 057d6332b24a4497c55a761c83c823eed9e3f23b (patch) | |
tree | 15ad5c70288bc61084fd01c2f9b0db208d581c12 /fs/fat | |
parent | Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net (diff) | |
download | linux-057d6332b24a4497c55a761c83c823eed9e3f23b.tar.xz linux-057d6332b24a4497c55a761c83c823eed9e3f23b.zip |
cifs: extend the buffer length enought for sprintf() using
For cifs_set_cifscreds() in "fs/cifs/connect.c", 'desc' buffer length
is 'CIFSCREDS_DESC_SIZE' (56 is less than 256), and 'ses->domainName'
length may be "255 + '\0'".
The related sprintf() may cause memory overflow, so need extend related
buffer enough to hold all things.
It is also necessary to be sure of 'ses->domainName' must be less than
256, and define the related macro instead of hard code number '256'.
Signed-off-by: Chen Gang <gang.chen@asianux.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com>
Reviewed-by: Scott Lovenberg <scott.lovenberg@gmail.com>
CC: <stable@vger.kernel.org>
Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/fat')
0 files changed, 0 insertions, 0 deletions