Re: [PATCH v6 2/4] lib: vsprintf: Fix handling of number field widths in vsscanf

2021-02-11 Thread Petr Mladek
On Tue 2021-02-09 15:56:02, Richard Fitzgerald wrote: > The existing code attempted to handle numbers by doing a strto[u]l(), > ignoring the field width, and then repeatedly dividing to extract the > field out of the full converted value. If the string contains a run of > valid digits longer than

[PATCH v6 2/4] lib: vsprintf: Fix handling of number field widths in vsscanf

2021-02-09 Thread Richard Fitzgerald
The existing code attempted to handle numbers by doing a strto[u]l(), ignoring the field width, and then repeatedly dividing to extract the field out of the full converted value. If the string contains a run of valid digits longer than will fit in a long or long long, this would overflow and no