lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <AANLkTil-rrLA9iLJRkf9C4aGK1CnvitSIVktScMpjvxx@mail.gmail.com>
Date:	Mon, 19 Jul 2010 16:58:21 -0500
From:	Steve French <smfrench@...il.com>
To:	Kulikov Vasiliy <segooon@...il.com>
Cc:	kernel-janitors@...r.kernel.org, Steve French <sfrench@...ba.org>,
	Jeff Layton <jlayton@...hat.com>,
	Dave Kleikamp <shaggy@...ux.vnet.ibm.com>,
	Tejun Heo <tj@...nel.org>, Joe Perches <joe@...ches.com>,
	linux-cifs@...r.kernel.org, samba-technical@...ts.samba.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 10/15] fs: cifs: check kmalloc() result

merged into cifs-2.6.git

On Fri, Jul 16, 2010 at 11:15 AM, Kulikov Vasiliy <segooon@...il.com> wrote:
> If kmalloc() fails exit with -ENOMEM.
>
> Signed-off-by: Kulikov Vasiliy <segooon@...il.com>
> ---
>  fs/cifs/readdir.c |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c
> index daf1753..d5e591f 100644
> --- a/fs/cifs/readdir.c
> +++ b/fs/cifs/readdir.c
> @@ -847,6 +847,11 @@ int cifs_readdir(struct file *file, void *direntry, filldir_t filldir)
>                end_of_smb = cifsFile->srch_inf.ntwrk_buf_start + max_len;
>
>                tmp_buf = kmalloc(UNICODE_NAME_MAX, GFP_KERNEL);
> +               if (tmp_buf == NULL) {
> +                       rc = -ENOMEM;
> +                       break;
> +               }
> +
>                for (i = 0; (i < num_to_fill) && (rc == 0); i++) {
>                        if (current_entry == NULL) {
>                                /* evaluate whether this case is an error */
> --
> 1.7.0.4
>
>



-- 
Thanks,

Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ