Date: Sat, 14 Sep 2019 13:30:54 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r352325 - stable/12/sys/kern Message-ID: <201909141330.x8EDUsgw036332@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Sat Sep 14 13:30:53 2019 New Revision: 352325 URL: https://svnweb.freebsd.org/changeset/base/352325 Log: MFC r352015: When loading ELF interpreter, initialize whole nested image_params with zero. Modified: stable/12/sys/kern/imgact_elf.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/imgact_elf.c ============================================================================== --- stable/12/sys/kern/imgact_elf.c Sat Sep 14 13:30:22 2019 (r352324) +++ stable/12/sys/kern/imgact_elf.c Sat Sep 14 13:30:53 2019 (r352325) @@ -735,7 +735,7 @@ __elfN(load_file)(struct proc *p, const char *file, u_ return (ECAPMODE); #endif - tempdata = malloc(sizeof(*tempdata), M_TEMP, M_WAITOK); + tempdata = malloc(sizeof(*tempdata), M_TEMP, M_WAITOK | M_ZERO); nd = &tempdata->nd; attr = &tempdata->attr; imgp = &tempdata->image_params; @@ -745,10 +745,6 @@ __elfN(load_file)(struct proc *p, const char *file, u_ */ imgp->proc = p; imgp->attr = attr; - imgp->firstpage = NULL; - imgp->image_header = NULL; - imgp->object = NULL; - imgp->execlabel = NULL; NDINIT(nd, LOOKUP, FOLLOW | LOCKSHARED | LOCKLEAF, UIO_SYSSPACE, file, curthread);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909141330.x8EDUsgw036332>