[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aYS_OGzRU8Usp7Jr@smile.fi.intel.com>
Date: Thu, 5 Feb 2026 18:03:04 +0200
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: Dmitry Antipov <dmantipov@...dex.ru>
Cc: Andrew Morton <akpm@...ux-foundation.org>, Kees Cook <kees@...nel.org>,
"Darrick J . Wong" <djwong@...nel.org>,
linux-hardening@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 1/5] lib: fix _parse_integer_limit() to handle overflow
On Thu, Feb 05, 2026 at 12:04:14PM +0300, Dmitry Antipov wrote:
> On Wed, 2026-02-04 at 16:31 +0200, Andy Shevchenko wrote:
>
> > In case you would need a v6, we can leave some of the lines untouched if we
> > switch to for-loop instead of while, but it might make the for-loop quite long.
>
> Hmm...the for-loop might be:
>
> for (res = 0, rv = 0; max_chars--; rv++, s++) {
res = 0 should be left outside, it's not part of the for-loop iterators.
> ...
> }
>
> and it makes _parse_integer_limit() a few lines shorter.
Yes, but more disruption on the code, so there are pros and cons,
but if you decide to go with it in v6, I won't object.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists