From: Mark Kettenis Date: Sun, 15 Jan 2006 20:21:32 +0000 (+0000) Subject: * osabi.c (generic_elf_osabi_sniffer): Use memcmp instead of X-Git-Url: http://git.efficios.com/?a=commitdiff_plain;h=1731e543e0b37977db57a805c349f3c1e15c259f;p=deliverable%2Fbinutils-gdb.git * osabi.c (generic_elf_osabi_sniffer): Use memcmp instead of strcmp to compare string to a byte buffer. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 79f1df7b85..cd0d085d86 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2006-01-15 Mark Kettenis + + * osabi.c (generic_elf_osabi_sniffer): Use memcmp instead of + strcmp to compare string to a byte buffer. + 2006-01-15 Daniel Jacobowitz * printcmd.c (output_command): Always initialize fmt.size. diff --git a/gdb/osabi.c b/gdb/osabi.c index d1f510287b..5d3962ae75 100644 --- a/gdb/osabi.c +++ b/gdb/osabi.c @@ -546,7 +546,8 @@ generic_elf_osabi_sniffer (bfd *abfd) /* The FreeBSD folks have been naughty; they stored the string "FreeBSD" in the padding of the e_ident field of the ELF header to "brand" their ELF binaries in FreeBSD 3.x. */ - if (strcmp (&elf_elfheader (abfd)->e_ident[8], "FreeBSD") == 0) + if (memcmp (&elf_elfheader (abfd)->e_ident[8], + "FreeBSD", sizeof ("FreeBSD") == 0) osabi = GDB_OSABI_FREEBSD_ELF; }