[linux-cifs-client] [PATCH 3/5] cifs: Fix incorrect destination
buffer size in cifs_strncpy_to_host
Suresh Jayaraman
sjayaraman at suse.de
Thu May 7 04:30:57 GMT 2009
adding missing S-O-B's
Suresh Jayaraman wrote:
> From: Suresh Jayaraman <sjayaraman at suse.de>
> Subject: Fix incorrect destination buffer size in cifs_strncpy_to_host
>
> Selected minimal hunks of commit 968460ebd8006d55661dec0fb86712b40d71c413
Signed-off-by: Suresh Jayaraman <sjayaraman at suse.de>
Acked-by: Jeff Layton <jlayton at redhat.com>
Signed-off-by: Steve French <sfrench at us.ibm.com>
> ---
> fs/cifs/cifssmb.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Index: linux-2.6.29.2/fs/cifs/cifssmb.c
> ===================================================================
> --- linux-2.6.29.2.orig/fs/cifs/cifssmb.c
> +++ linux-2.6.29.2/fs/cifs/cifssmb.c
> @@ -95,7 +95,7 @@ cifs_strncpy_to_host(char **dst, const c
>
> if (is_unicode) {
> plen = UniStrnlen((wchar_t *)src, maxlen);
> - *dst = kmalloc(plen + 2, GFP_KERNEL);
> + *dst = kmalloc((4 * plen) + 2, GFP_KERNEL);
> if (!*dst)
> goto cifs_strncpy_to_host_ErrExit;
> cifs_strfromUCS_le(*dst, (__le16 *)src, plen, nls_codepage);
> _______________________________________________
> linux-cifs-client mailing list
> linux-cifs-client at lists.samba.org
> https://lists.samba.org/mailman/listinfo/linux-cifs-client
--
Suresh Jayaraman
More information about the linux-cifs-client
mailing list