|
Message-ID: <20150821053054.GZ32742@brightrain.aerifal.cx> Date: Fri, 21 Aug 2015 01:30:54 -0400 From: Rich Felker <dalias@...c.org> To: musl@...ts.openwall.com Subject: Re: [PATCH] getsubopt: don't include leading = in value string On Tue, Aug 18, 2015 at 11:06:04AM +0200, Steven Barth wrote: > getsubopt incorrectly returns the delimiting = in the value string, > this patch fixes it by increasing the pointer position by one. > > Signed-off-by: Steven Barth <cyrus@...nwrt.org> > --- > src/misc/getsubopt.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/misc/getsubopt.c b/src/misc/getsubopt.c > index dac9bf9..53ee957 100644 > --- a/src/misc/getsubopt.c > +++ b/src/misc/getsubopt.c > @@ -15,7 +15,7 @@ int getsubopt(char **opt, char *const *keys, char **val) > size_t l = strlen(keys[i]); > if (strncmp(keys[i], s, l)) continue; > if (s[l] == '=') > - *val = s + l; > + *val = s + l + 1; > else if (s[l]) continue; > return i; > } > -- Thanks! Applied. Rich
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.