[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220628074708.fg3ocx3vu7affkxl@ava.usersys.com>
Date: Tue, 28 Jun 2022 08:47:08 +0100
From: Aaron Tomlin <atomlin@...hat.com>
To: Christophe Leroy <christophe.leroy@...roup.eu>
Cc: "mcgrof@...nel.org" <mcgrof@...nel.org>,
"linux-modules@...r.kernel.org" <linux-modules@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] module: Show the last unloaded module's taint flag(s)
On Tue 2022-06-28 05:54 +0000, Christophe Leroy wrote:
> > - /* Store the name of the last unloaded module for diagnostic purposes */
> > strlcpy(last_unloaded_module, mod->name, sizeof(last_unloaded_module));
> > + strcat(last_unloaded_module, module_flags(mod, buf, false));
>
> You replace a bounded string copy by an unbounded strict contat.
>
> Should you use strlcat() instead ?
Hi Christophe,
Why? If I understand correctly, both the destination and source string are
NULL-terminated (see module_flags()). So, strcat() should be sufficient.
Kind regards,
--
Aaron Tomlin
Powered by blists - more mailing lists