[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZBxFuSZBRCAM+OQg@smile.fi.intel.com>
Date: Thu, 23 Mar 2023 14:27:37 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Jan Kara <jack@...e.cz>
Cc: Kees Cook <keescook@...omium.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Cezary Rojewski <cezary.rojewski@...el.com>,
linux-ext4@...r.kernel.org, linux-kernel@...r.kernel.org,
Theodore Ts'o <tytso@....edu>, Jan Kara <jack@...e.com>,
"Rafael J. Wysocki" <rafael@...nel.org>
Subject: Re: [PATCH v1 1/3] jbd2: Avoid printing out the boundary
On Thu, Mar 23, 2023 at 10:53:46AM +0100, Jan Kara wrote:
> On Wed 22-03-23 16:12:04, Andy Shevchenko wrote:
> > Theoretically possible that "%pg" will take all room for the j_devname
> > and hence the "-%lu" will go out the boundary due to unconditional
> > sprintf() in use. To make this code more robust, replace two sequential
> > s*printf():s by a single call and then replace forbidden character.
> > It's possible to do this way, because '/' won't ever be in the result
> > of "-%lu".
> >
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
>
> Looks good. Feel free to add:
>
> Reviewed-by: Jan Kara <jack@...e.cz>
Thank you! I'll incorporate this into v2 with dropping not anymore used
variable (as found by LKP).
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists