Re: [PATCH v3 0/4] Make sscanf() stricter

From: Andy Shevchenko
Date: Tue Jun 20 2023 - 09:54:26 EST


On Tue, Jun 20, 2023 at 04:52:43PM +0300, Andy Shevchenko wrote:
> On Tue, Jun 20, 2023 at 03:34:09PM +0200, Petr Mladek wrote:
> > On Thu 2023-06-15 14:23:59, Andy Shevchenko wrote:
> > > On Thu, Jun 15, 2023 at 08:06:46AM +0000, David Laight wrote:

...

> > + %pj or another %p modifiers would be hard to understand either.
> >
> > Yes, we have %pe but I think that only few people really use it.
> > And it is kind of self-explanatory because it is typically
> > used together with ERR_PTR() and with variables called
> > "err" or "ret".
>
> j, besides the luck of no (yet) use in the kernel's printf(), is
> described for printf(3)
>
> j A following integer conversion corresponds to an intmax_t or uintmax_t
> argument, or a following n conversion corresponds to a pointer to an
> intmax_t argument.
>
> So, I this among all proposals, this one is the best (while all of them may

s/this/think

> sound not good).

--
With Best Regards,
Andy Shevchenko