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)
This commit is contained in:
Konstantin Belousov 2019-03-30 16:58:51 +00:00
parent cb5d2742ff
commit be7808dca3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=345734

View File

@ -279,7 +279,7 @@ __elfN(get_brandinfo)(struct image_params *imgp, const char *interp,
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