Trim spaces at the end of the buffer before trying to convert it to an oid
This allows to write entries in sysctl.conf with spaces before the '=' like kern.ipc.shmmax = 9663676416 Sponsored by: Gandi.net
This commit is contained in:
parent
b21a2490b7
commit
33831fe3b5
@ -233,6 +233,12 @@ parse(const char *string, int lineno)
|
||||
newval = 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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user