From a75a0c55f4a29f969f35a27c908b128eb4d4edcd Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Thu, 16 Aug 2001 20:16:20 +0000 Subject: [PATCH] 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 --- sys/kern/imgact_elf.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index 96ef2df889ba..f503bf527c15 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);