diff options
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/sysctl/sysctl.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sbin/sysctl/sysctl.c b/sbin/sysctl/sysctl.c index d740778c..8d67644 100644 --- a/sbin/sysctl/sysctl.c +++ b/sbin/sysctl/sysctl.c @@ -262,6 +262,12 @@ parse(const char *string, int lineno) newvalstr = cp; newsize = strlen(cp); } + /* Trim spaces */ + cp = bufp + strlen(bufp) - 1; + while (cp >= bufp && isspace((int)*cp)) { + *cp = '\0'; + cp--; + } len = name2oid(bufp, mib); if (len < 0) { |