Re: [PATCH v2] _scanf.c: Implement 'm' modifier for 'c' and '[' conversions.
Max Filippov <[email protected]> Fri, 15 May 2015 21:44:11 +0300
| Newsgroups | gmane.comp.lib.uclibc.general |
|---|---|
| Message-ID | <CAMo8BfJ7C6A0bptFCqqZjxYA+bC40x97f8go6cq7z8n5rc8-zQ@mail.gmail.com> |
On Fri, May 8, 2015 at 1:15 AM, Max Filippov <[email protected]> wrote: > From: Will Newton <[email protected]> > > The current code implements the 'm' modifier only for 's' > conversions and would cause a segfault if it was used for 'c' > or '[' conversions. This patch extends the code to cover these > cases too. > > The original version could write scanned data outside the passed buffer > because index i used in the '[' conversion handling block was clobbered. > > Signed-off-by: Will Newton <[email protected]> > Signed-off-by: Max Filippov <[email protected]> > --- > Changes v1->v2: > - add testcase for %[...]/%c/%m[...]/%mc. Ping? -- Thanks. -- Max