[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VfoiQ_PxBph8JnNzun4y5Z-9z_rUcjGyM7A2CAwynddeA@mail.gmail.com>
Date: Thu, 8 Mar 2018 19:47:37 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Tycho Andersen <tycho@...ho.ws>
Cc: Mimi Zohar <zohar@...ux.vnet.ibm.com>,
Dmitry Kasatkin <dmitry.kasatkin@...il.com>,
linux-integrity@...r.kernel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
kernel-hardening@...ts.openwall.com
Subject: Re: [PATCH] ima: drop vla in ima_audit_measurement()
On Thu, Mar 8, 2018 at 7:14 PM, Tycho Andersen <tycho@...ho.ws> wrote:
> In keeping with the directive to get rid of VLAs [1], let's drop the VLA
> from ima_audit_measurement(). We need to adjust the return type of
> ima_audit_measurement, because now this function can fail if an allocation
> fails.
> + algo_hash_len = hash_len + strlen(algo_name) + 2;
> + algo_hash = kzalloc(algo_hash_len, GFP_KERNEL);
> - snprintf(algo_hash, sizeof(algo_hash), "%s:%s", algo_name, hash);
> + snprintf(algo_hash, algo_hash_len, "%s:%s", algo_name, hash);
kasprintf() ?
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists