summaryrefslogtreecommitdiff
path: root/usr.sbin/jail
diff options
context:
space:
mode:
authorJamie Gritton <jamie@FreeBSD.org>2012-08-23 19:39:23 +0000
committerJamie Gritton <jamie@FreeBSD.org>2012-08-23 19:39:23 +0000
commite9322de834debf91d35c9a0fc67296a280ce2bb3 (patch)
tree95e3fb7174afa20ab61e06ae8440c684eab672fe /usr.sbin/jail
parent671303c6d59578e15cb0246bede35d15bb13af00 (diff)
downloadsrc-test2-e9322de834debf91d35c9a0fc67296a280ce2bb3.tar.gz
src-test2-e9322de834debf91d35c9a0fc67296a280ce2bb3.zip
Notes
Diffstat (limited to 'usr.sbin/jail')
-rw-r--r--usr.sbin/jail/config.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.sbin/jail/config.c b/usr.sbin/jail/config.c
index 508f28b4b423..ec96c0c95e90 100644
--- a/usr.sbin/jail/config.c
+++ b/usr.sbin/jail/config.c
@@ -597,6 +597,7 @@ check_intparams(struct cfjail *j)
"ip4.addr: bad netmask \"%s\"", cs);
error = -1;
}
+ *cs = '\0';
s->len = cs - s->s;
}
}
@@ -620,6 +621,7 @@ check_intparams(struct cfjail *j)
cs);
error = -1;
}
+ *cs = '\0';
s->len = cs - s->s;
}
}
@@ -713,11 +715,10 @@ import_params(struct cfjail *j)
cs = value;
TAILQ_FOREACH_SAFE(s, &p->val, tq, ts) {
memcpy(cs, s->s, s->len);
- if (ts != NULL) {
- cs += s->len + 1;
- cs[-1] = ',';
- }
+ cs += s->len + 1;
+ cs[-1] = ',';
}
+ value[vallen - 1] = '\0';
}
if (jailparam_import(jp, value) < 0) {
error = -1;