diff options
author | Steven Barth <cyrus@openwrt.org> | 2015-08-18 09:18:40 +0000 |
---|---|---|
committer | Steven Barth <cyrus@openwrt.org> | 2015-08-18 09:18:40 +0000 |
commit | a6dc587cf6c030dd211b598d3929b0e1bd46b404 (patch) | |
tree | a1897db890e925db9122593bee1311d0a64b86dd /toolchain/musl/patches | |
parent | bef52af66f21ebd5251c4bbe765b82482d84aab2 (diff) | |
download | upstream-a6dc587cf6c030dd211b598d3929b0e1bd46b404.tar.gz upstream-a6dc587cf6c030dd211b598d3929b0e1bd46b404.tar.bz2 upstream-a6dc587cf6c030dd211b598d3929b0e1bd46b404.zip |
musl: fix getsubopt function
Signed-off-by: Steven Barth <steven@midlink.org>
SVN-Revision: 46684
Diffstat (limited to 'toolchain/musl/patches')
-rw-r--r-- | toolchain/musl/patches/002-fix-getsubopt.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/toolchain/musl/patches/002-fix-getsubopt.patch b/toolchain/musl/patches/002-fix-getsubopt.patch new file mode 100644 index 0000000000..2fcd5f1822 --- /dev/null +++ b/toolchain/musl/patches/002-fix-getsubopt.patch @@ -0,0 +1,29 @@ +From 2a502f995d041977f43f05556a3beba64df69858 Mon Sep 17 00:00:00 2001 +From: Steven Barth <cyrus@openwrt.org> +Date: Tue, 18 Aug 2015 11:03:45 +0200 +Subject: [PATCH] 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> +--- + 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; + } +-- +2.1.4 + |