Date: Thu, 18 Jul 2013 19:39:49 +0000 From: Alexander Nasonov <al...@netbsd.org>
Always terminate qc_name with NUL because pool_init(9) uses strcmp(3) to compare wchans. @@ -553,6 +553,7 @@ qc_init(vmem_t *vm, size_t qcache_max, int ipl) qc->qc_vmem = vm; snprintf(qc->qc_name, sizeof(qc->qc_name), "%s-%zu", vm->vm_name, size); + qc->qc_name[sizeof(qc->qc_name) - 1] = '\0'; This shouldn't be necessary: snprintf guarantees null termination. Did you observe a pool name without null termination in pool_init in the wild?