diff options
author | Mark Kettenis <kettenis@gnu.org> | 2006-01-15 20:21:32 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2006-01-15 20:21:32 +0000 |
commit | 1731e543e0b37977db57a805c349f3c1e15c259f (patch) | |
tree | 836dbfb0f64b7775d7c9f63bd2c38f0db635030d /gdb/osabi.c | |
parent | 777ea8f14f3be7147da90d067f72f925ea4f282f (diff) | |
download | binutils-gdb-1731e543e0b37977db57a805c349f3c1e15c259f.tar.gz |
* osabi.c (generic_elf_osabi_sniffer): Use memcmp instead of
strcmp to compare string to a byte buffer.
Diffstat (limited to 'gdb/osabi.c')
-rw-r--r-- | gdb/osabi.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/osabi.c b/gdb/osabi.c index d1f510287b5..5d3962ae752 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; } |