summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2001-08-16 20:16:20 +0000
committerpeter <peter@FreeBSD.org>2001-08-16 20:16:20 +0000
commit24b623f3028ee441bbb4b0cb3e467bc83e762058 (patch)
treed8678b67165ff727823d6b86dfa8bcef38f62a24 /sys
parent7123562464a71826a1e011075e0fc75d5cae2645 (diff)
downloadFreeBSD-src-24b623f3028ee441bbb4b0cb3e467bc83e762058.zip
FreeBSD-src-24b623f3028ee441bbb4b0cb3e467bc83e762058.tar.gz
Don't explicitly null-terminate. The buffer we are copying into is
already zeroed, and we explicitly leave the last byte untouched. Submitted by: bde
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/imgact_elf.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c
index 96ef2df..f503bf5 100644
--- a/sys/kern/imgact_elf.c
+++ b/sys/kern/imgact_elf.c
@@ -942,7 +942,6 @@ elf_corehdr(p, vp, cred, numsegs, hdr, hdrsize)
psinfo->pr_version = PRPSINFO_VERSION;
psinfo->pr_psinfosz = sizeof(prpsinfo_t);
strncpy(psinfo->pr_fname, p->p_comm, sizeof(psinfo->pr_fname) - 1);
- psinfo->pr_fname[sizeof(psinfo->pr_fname) - 1] = '\0';
/* XXX - We don't fill in the command line arguments properly yet. */
strncpy(psinfo->pr_psargs, p->p_comm, PRARGSZ);
OpenPOWER on IntegriCloud