diff options
author | Chen Gang <gang.chen@asianux.com> | 2013-07-19 09:01:36 +0800 |
---|---|---|
committer | Kamal Mostafa <kamal@canonical.com> | 2013-08-21 10:58:29 -0700 |
commit | 19177f03b039fa3b55de36aeb3a811589464c0f9 (patch) | |
tree | 9029f0e8f9f0082a4a8c2e70ecef764ded25b2e0 /arch | |
parent | 8df18668198eec348abb2d1443ccdac65de533e2 (diff) |
cifs: extend the buffer length enought for sprintf() using
commit 057d6332b24a4497c55a761c83c823eed9e3f23b upstream.
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>
Signed-off-by: Steve French <smfrench@gmail.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions