summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_intr.c
diff options
context:
space:
mode:
authorrobert <robert@FreeBSD.org>2002-10-17 20:03:38 +0000
committerrobert <robert@FreeBSD.org>2002-10-17 20:03:38 +0000
commit1e0cdb534a593672b1178f980abd762bd316b57d (patch)
tree0a05cf96e39ba02857dd2294138be9f6e7f278ad /sys/kern/kern_intr.c
parent5e20feda93dab6d1a2a9c89e8f6a255504b3c3a3 (diff)
downloadFreeBSD-src-1e0cdb534a593672b1178f980abd762bd316b57d.zip
FreeBSD-src-1e0cdb534a593672b1178f980abd762bd316b57d.tar.gz
Use strlcpy() instead of strncpy() to copy NUL terminated strings
for safety and consistency.
Diffstat (limited to 'sys/kern/kern_intr.c')
-rw-r--r--sys/kern/kern_intr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/kern_intr.c b/sys/kern/kern_intr.c
index 2d7b160..4bace31 100644
--- a/sys/kern/kern_intr.c
+++ b/sys/kern/kern_intr.c
@@ -124,7 +124,8 @@ ithread_update(struct ithd *ithd)
return;
p = td->td_proc;
- strncpy(p->p_comm, ithd->it_name, sizeof(ithd->it_name));
+ strlcpy(p->p_comm, ithd->it_name, sizeof(ithd->it_name));
+
ih = TAILQ_FIRST(&ithd->it_handlers);
if (ih == NULL) {
mtx_lock_spin(&sched_lock);
OpenPOWER on IntegriCloud