summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorbrucec <brucec@FreeBSD.org>2010-11-22 20:18:46 +0000
committerbrucec <brucec@FreeBSD.org>2010-11-22 20:18:46 +0000
commit02105a8e4a320f316386a600979ac5f86ec71d68 (patch)
tree2648f6dfe599565db56f317156f22afdc9d72752 /usr.bin
parent621e6d10d808024e7f014b908cbcc5da124bd745 (diff)
downloadFreeBSD-src-02105a8e4a320f316386a600979ac5f86ec71d68.zip
FreeBSD-src-02105a8e4a320f316386a600979ac5f86ec71d68.tar.gz
hdr.elf.e_ident[EI_OSABI] is not a bitmask so '==' should been used.
Reported by: Artem Belevich <fbsdlist at src.cx>
Diffstat (limited to 'usr.bin')
-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 f83632a..00c8797 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);
}
OpenPOWER on IntegriCloud