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 _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"