summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2017-03-14 10:08:12 +0000
committerkib <kib@FreeBSD.org>2017-03-14 10:08:12 +0000
commitd3dbc2dba2c5f2011fbf6ff98f6617135211f190 (patch)
tree3254914482d5d438ce2ff3f063b3a610d4f46ac6
parentc3bc35f1af2ceb980ff9ff4ef6f63d00ad235a66 (diff)
downloadFreeBSD-src-d3dbc2dba2c5f2011fbf6ff98f6617135211f190.zip
FreeBSD-src-d3dbc2dba2c5f2011fbf6ff98f6617135211f190.tar.gz
MFC r314850:
Require whole brand string matching for old Elf branding.
-rw-r--r--sys/kern/imgact_elf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c
index 7a6691c..d1ac039 100644
--- a/sys/kern/imgact_elf.c
+++ b/sys/kern/imgact_elf.c
@@ -309,8 +309,8 @@ __elfN(get_brandinfo)(struct image_params *imgp, const char *interp,
continue;
if (hdr->e_machine == bi->machine &&
(hdr->e_ident[EI_OSABI] == bi->brand ||
- strncmp((const char *)&hdr->e_ident[OLD_EI_BRAND],
- bi->compat_3_brand, strlen(bi->compat_3_brand)) == 0)) {
+ strcmp((const char *)&hdr->e_ident[OLD_EI_BRAND],
+ bi->compat_3_brand) == 0)) {
/* Looks good, but give brand a chance to veto */
if (!bi->header_supported || bi->header_supported(imgp))
return (bi);
OpenPOWER on IntegriCloud