* osabi.c (generic_elf_osabi_sniffer): Use memcmp instead of

strcmp to compare string to a byte buffer.
This commit is contained in:
Mark Kettenis 2006-01-15 20:21:32 +00:00
parent 777ea8f14f
commit 1731e543e0
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2006-01-15 Mark Kettenis <kettenis@gnu.org>
* osabi.c (generic_elf_osabi_sniffer): Use memcmp instead of
strcmp to compare string to a byte buffer.
2006-01-15 Daniel Jacobowitz <dan@codesourcery.com>
* printcmd.c (output_command): Always initialize fmt.size.

View File

@ -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;
}