From aa71ec3db8a3ca564cb37ec90c639020dfe30b6b Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Tue, 18 Aug 2015 11:06:04 +0200 Subject: 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 --- 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 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; } -- cgit v1.2.1