diff options
Diffstat (limited to 'lib/libzpool')
-rw-r--r-- | lib/libzpool/taskq.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libzpool/taskq.c b/lib/libzpool/taskq.c index 8d6f1c93d..b1e71e998 100644 --- a/lib/libzpool/taskq.c +++ b/lib/libzpool/taskq.c @@ -276,7 +276,7 @@ taskq_create(const char *name, int nthreads, pri_t pri, cv_init(&tq->tq_dispatch_cv, NULL, CV_DEFAULT, NULL); cv_init(&tq->tq_wait_cv, NULL, CV_DEFAULT, NULL); cv_init(&tq->tq_maxalloc_cv, NULL, CV_DEFAULT, NULL); - (void) strncpy(tq->tq_name, name, TASKQ_NAMELEN); + (void) strlcpy(tq->tq_name, name, sizeof (tq->tq_name)); tq->tq_flags = flags | TASKQ_ACTIVE; tq->tq_active = nthreads; tq->tq_nthreads = nthreads; |