summaryrefslogtreecommitdiff
path: root/sys/kern/subr_taskqueue.c
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2010-01-21 19:11:18 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2010-01-21 19:11:18 +0000
commit49cc13441b0f01b031ce131443f8416eb979e766 (patch)
tree093349795537e68a7b4f8620c4d7343f31c3196e /sys/kern/subr_taskqueue.c
parent7b10638c5b53a09b1f3ac58c4a48df0433288ade (diff)
Notes
Diffstat (limited to 'sys/kern/subr_taskqueue.c')
-rw-r--r--sys/kern/subr_taskqueue.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/subr_taskqueue.c b/sys/kern/subr_taskqueue.c
index 22c1809a8a29..8405b3d642b7 100644
--- a/sys/kern/subr_taskqueue.c
+++ b/sys/kern/subr_taskqueue.c
@@ -301,7 +301,7 @@ taskqueue_start_threads(struct taskqueue **tqp, int count, int pri,
struct thread *td;
struct taskqueue *tq;
int i, error;
- char ktname[MAXCOMLEN];
+ char ktname[MAXCOMLEN + 1];
if (count <= 0)
return (EINVAL);
@@ -309,7 +309,7 @@ taskqueue_start_threads(struct taskqueue **tqp, int count, int pri,
tq = *tqp;
va_start(ap, name);
- vsnprintf(ktname, MAXCOMLEN, name, ap);
+ vsnprintf(ktname, sizeof(ktname), name, ap);
va_end(ap);
tq->tq_threads = malloc(sizeof(struct thread *) * count, M_TASKQUEUE,