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:
parent
cb5d2742ff
commit
be7808dca3
@ -279,7 +279,7 @@ __elfN(get_brandinfo)(struct image_params *imgp, const char *interp,
|
|||||||
boolean_t ret;
|
boolean_t ret;
|
||||||
int i, interp_name_len;
|
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
|
* We support four types of branding -- (1) the ELF EI_OSABI field
|
||||||
|
Loading…
x
Reference in New Issue
Block a user