Date: Tue, 03 Sep 2019 14:06:04 -0000 From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345734 - head/sys/kern Message-ID: <201903301658.x2UGwpYm089493@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Sat Mar 30 16:58:51 2019 New Revision: 345734 URL: https://svnweb.freebsd.org/changeset/base/345734 Log: Fix branding after r345661. In particular, elf32 FreeBSD binaries were not executed on LP64 hosts. The interp_name_len value should account for the nul terminator. This is needed for strncmp()s in brand checking code to work. Reported by: andreast Sponsored by: The FreeBSD Foundation MFC after: 12 days (together with r345661) Modified: head/sys/kern/imgact_elf.c Modified: head/sys/kern/imgact_elf.c ============================================================================== --- head/sys/kern/imgact_elf.c Sat Mar 30 13:59:02 2019 (r345733) +++ head/sys/kern/imgact_elf.c Sat Mar 30 16:58:51 2019 (r345734) @@ -279,7 +279,7 @@ __elfN(get_brandinfo)(struct image_params *imgp, const boolean_t ret; int i, interp_name_len; - interp_name_len = interp != NULL ? strlen(interp) : 0; + interp_name_len = interp != NULL ? strlen(interp) + 1 : 0; /* * We support four types of branding -- (1) the ELF EI_OSABI field
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201903301658.x2UGwpYm089493>