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

2020-12-08 Thread pmladek
On Mon 2020-11-30 14:57:57, Richard Fitzgerald wrote: > The existing code attempted to handle numbers by doing a strto[u]l(), > ignoring the field width, and then bitshifting the field out of the > converted value. If the string contains a run of valid digits longer > than will fit in a long or lon

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

2020-11-30 Thread Richard Fitzgerald
The existing code attempted to handle numbers by doing a strto[u]l(), ignoring the field width, and then bitshifting the field out of the 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 amount of bitshifting can r