Re: [PATCH 1/1] Revert "lib: fix _parse_integer_limit() to handle overflow"

From: Andy Shevchenko

Date: Fri Jul 03 2026 - 02:05:34 EST


On Fri, Jul 03, 2026 at 08:55:03AM +0300, Dmitry Antipov wrote:
> On 7/2/26 9:06 PM, Alexey Dobriyan wrote:
>
> > 1) this patch breaks scanf() which uses _parse_integer_limit()
> > internally, and is supposed to get overflowed result (however
> > incorrect it may be)
> >
> > 2) using check_mul_overflow() and check_add_overflow() as written
> > doesn't add any overflow protection because it is under branch where
> > such overflow can't happen if radix is kept <=16,
>
> It would be helpful to see an examples (preferably designed
> as KUnit tests) to illustrate these breakages.

+1. We need test cases, since there were none what is the real life example of
the breakage?

--
With Best Regards,
Andy Shevchenko