Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
lede-mikrotik
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Johannes Rudolph
lede-mikrotik
Commits
a6dc587c
Commit
a6dc587c
authored
9 years ago
by
Steven Barth
Browse files
Options
Downloads
Patches
Plain Diff
musl: fix getsubopt function
Signed-off-by:
Steven Barth
<
steven@midlink.org
>
SVN-Revision: 46684
parent
bef52af6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
toolchain/musl/patches/002-fix-getsubopt.patch
+29
-0
29 additions, 0 deletions
toolchain/musl/patches/002-fix-getsubopt.patch
with
29 additions
and
0 deletions
toolchain/musl/patches/002-fix-getsubopt.patch
0 → 100644
+
29
−
0
View file @
a6dc587c
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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment