cifs: extend the buffer length enought for sprintf() using
authorChen Gang <gang.chen@asianux.com>
Fri, 19 Jul 2013 01:01:36 +0000 (09:01 +0800)
committerSteve French <smfrench@gmail.com>
Wed, 31 Jul 2013 04:54:40 +0000 (23:54 -0500)
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>

No differences found
This page took 0.028985 seconds and 5 git commands to generate.