-
由 Chen Gang 提交于
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: NChen Gang <gang.chen@asianux.com> Reviewed-by: NJeff Layton <jlayton@redhat.com> Reviewed-by: NShirish Pargaonkar <shirishpargaonkar@gmail.com> Reviewed-by: NScott Lovenberg <scott.lovenberg@gmail.com> CC: <stable@vger.kernel.org> Signed-off-by: NSteve French <smfrench@gmail.com>
057d6332