diff options
author | Steven Barth <cyrus@openwrt.org> | 2015-08-18 11:06:04 +0200 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2015-08-21 01:29:10 -0400 |
commit | aa71ec3db8a3ca564cb37ec90c639020dfe30b6b (patch) | |
tree | 50c09eda1690b945d10355d6cbbbb0900a2c8865 /src/misc/getsubopt.c | |
parent | 5a9c8c05a5a0cdced4122589184fd795b761bb4a (diff) | |
download | musl-aa71ec3db8a3ca564cb37ec90c639020dfe30b6b.tar.gz |
getsubopt: don't include leading = in value string
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@openwrt.org>
Diffstat (limited to 'src/misc/getsubopt.c')
-rw-r--r-- | src/misc/getsubopt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/misc/getsubopt.c b/src/misc/getsubopt.c index dac9bf9e..53ee9573 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; } |