Re: [PATCH v3] sscanf: implement basic character sets

2016-02-23 Thread Rasmus Villemoes
On Tue, Feb 23 2016, Rasmus Villemoes wrote: > On that note, it seems that your field width handling is off-by-one. Sorry about that, it's me who's off-by-one. Rasmus > To get rid of the allocation, why not use a small bitmap? Something like > > { > char *s = (char *)va_arg(args, char *); >

Re: [PATCH v3] sscanf: implement basic character sets

2016-02-23 Thread Rasmus Villemoes
On Tue, Feb 23 2016, Jessica Yu wrote: > Implement basic character sets for the '%[]' conversion specifier. > > > lib/vsprintf.c | 41 + > 1 file changed, 41 insertions(+) > > diff --git a/lib/vsprintf.c b/lib/vsprintf.c > index 525c8e1..983358a 100644 > -

Re: [PATCH v3] sscanf: implement basic character sets

2016-02-23 Thread Andrew Morton
On Tue, 23 Feb 2016 15:38:22 -0500 Jessica Yu wrote: > Implement basic character sets for the '%[]' conversion specifier. > > The '%[]' conversion specifier matches a nonempty sequence of characters > from the specified set of accepted (or with '^', rejected) characters > between the brackets. T

Re: [PATCH v3] sscanf: implement basic character sets

2016-02-23 Thread Kees Cook
On Tue, Feb 23, 2016 at 12:38 PM, Jessica Yu wrote: > Implement basic character sets for the '%[]' conversion specifier. > > The '%[]' conversion specifier matches a nonempty sequence of characters > from the specified set of accepted (or with '^', rejected) characters > between the brackets. The

[PATCH v3] sscanf: implement basic character sets

2016-02-23 Thread Jessica Yu
Implement basic character sets for the '%[]' conversion specifier. The '%[]' conversion specifier matches a nonempty sequence of characters from the specified set of accepted (or with '^', rejected) characters between the brackets. The substring matched is to be made up of characters in (or not in