Re: [PATCH RFC] sscanf: Fix integer overflow with sscanf field width

2019-05-24 Thread Jan Beulich
>>> On 23.05.19 at 19:27, wrote: > This fixes 53809751ac23 ("sscanf: don't ignore field widths for numeric > conversions"). sscanf overflows integers with simple strings such as dates. > As an example, consider > > r = sscanf("20190523123456", "%4d%2d%2d%2d%2d%2d", > , , , >

Re: [PATCH RFC] sscanf: Fix integer overflow with sscanf field width

2019-05-23 Thread Alexey Dobriyan
> What are your thoughts? Don't use sscanf(3), it is misdesigned.

[PATCH RFC] sscanf: Fix integer overflow with sscanf field width

2019-05-23 Thread Fredrik Noring
Hi, This fixes 53809751ac23 ("sscanf: don't ignore field widths for numeric conversions"). sscanf overflows integers with simple strings such as dates. As an example, consider r = sscanf("20190523123456", "%4d%2d%2d%2d%2d%2d", , , , , , );