Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Nov 2010 20:18:46 +0000 (UTC)
From:      Bruce Cran <brucec@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r215705 - head/usr.bin/ldd
Message-ID:  <201011222018.oAMKIkUa004407@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: brucec
Date: Mon Nov 22 20:18:46 2010
New Revision: 215705
URL: http://svn.freebsd.org/changeset/base/215705

Log:
  hdr.elf.e_ident[EI_OSABI] is not a bitmask so '==' should been used.
  
  Reported by: Artem Belevich <fbsdlist at src.cx>

Modified:
  head/usr.bin/ldd/ldd.c

Modified: head/usr.bin/ldd/ldd.c
==============================================================================
--- head/usr.bin/ldd/ldd.c	Mon Nov 22 20:10:48 2010	(r215704)
+++ head/usr.bin/ldd/ldd.c	Mon Nov 22 20:18:46 2010	(r215705)
@@ -331,7 +331,7 @@ is_executable(const char *fname, int fd,
 			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,
 			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);
 			}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201011222018.oAMKIkUa004407>