From 70557f4f838e4e4997909e0a18df439b18453bb4 Mon Sep 17 00:00:00 2001 From: Rebecca Cran Date: Mon, 22 Nov 2010 20:18:46 +0000 Subject: [PATCH] hdr.elf.e_ident[EI_OSABI] is not a bitmask so '==' should been used. Reported by: Artem Belevich --- usr.bin/ldd/ldd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/ldd/ldd.c b/usr.bin/ldd/ldd.c index f83632ab08e..00c87975d85 100644 --- a/usr.bin/ldd/ldd.c +++ b/usr.bin/ldd/ldd.c @@ -331,7 +331,7 @@ is_executable(const char *fname, int fd, int *is_shlib, int *type) return (0); } if (hdr.elf32.e_type == ET_DYN) { - if (hdr.elf32.e_ident[EI_OSABI] & ELFOSABI_FREEBSD) { + if (hdr.elf32.e_ident[EI_OSABI] == ELFOSABI_FREEBSD) { *is_shlib = 1; return (1); } @@ -373,7 +373,7 @@ is_executable(const char *fname, int fd, int *is_shlib, int *type) return (0); } if (hdr.elf.e_type == ET_DYN) { - if (hdr.elf.e_ident[EI_OSABI] & ELFOSABI_FREEBSD) { + if (hdr.elf.e_ident[EI_OSABI] == ELFOSABI_FREEBSD) { *is_shlib = 1; return (1); }