aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/ldd
diff options
context:
space:
mode:
authorRebecca Cran <brucec@FreeBSD.org>2010-11-22 20:18:46 +0000
committerRebecca Cran <brucec@FreeBSD.org>2010-11-22 20:18:46 +0000
commit70557f4f838e4e4997909e0a18df439b18453bb4 (patch)
tree2648f6dfe599565db56f317156f22afdc9d72752 /usr.bin/ldd
parent1161d4202c3c938b634bd14435ec9ba96755a5d2 (diff)
downloadsrc-70557f4f838e4e4997909e0a18df439b18453bb4.tar.gz
src-70557f4f838e4e4997909e0a18df439b18453bb4.zip
hdr.elf.e_ident[EI_OSABI] is not a bitmask so '==' should been used.
Reported by: Artem Belevich <fbsdlist at src.cx>
Notes
Notes: svn path=/head/; revision=215705
Diffstat (limited to 'usr.bin/ldd')
-rw-r--r--usr.bin/ldd/ldd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ldd/ldd.c b/usr.bin/ldd/ldd.c
index f83632ab08e6..00c87975d854 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);
}