summaryrefslogtreecommitdiff
path: root/opcodes/sh-dis.c
diff options
context:
space:
mode:
authorJoern Rennecke <joern.rennecke@embecosm.com>2002-05-22 18:16:45 +0000
committerJoern Rennecke <joern.rennecke@embecosm.com>2002-05-22 18:16:45 +0000
commit4ee33023a0c20ff518b10d132637d872c08d12df (patch)
treee2d0b9d39aa2c5110fa52423de3a1e0d1de4582b /opcodes/sh-dis.c
parenta75a8c6713d0154c7d0788f5a2c4d1cfa7b7f52e (diff)
downloadbinutils-gdb-4ee33023a0c20ff518b10d132637d872c08d12df.tar.gz
Avoid dereferencing null pointer in:
* sh-dis.c (print_insn_sh): If coff and bfd_mach_sh, use arch_sh4 for disassembly.
Diffstat (limited to 'opcodes/sh-dis.c')
-rw-r--r--opcodes/sh-dis.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/opcodes/sh-dis.c b/opcodes/sh-dis.c
index 7f403806dd4..24d4b41eaff 100644
--- a/opcodes/sh-dis.c
+++ b/opcodes/sh-dis.c
@@ -304,7 +304,8 @@ print_insn_sh (memaddr, info)
/* SH coff object files lack information about the machine type, so
we end up with bfd_mach_sh unless it was set explicitly (which
could have happended if this is a call from gdb or the simulator.) */
- if (bfd_asymbol_flavour(*info->symbols) == bfd_target_coff_flavour)
+ if (info->symbols
+ && bfd_asymbol_flavour(*info->symbols) == bfd_target_coff_flavour)
target_arch = arch_sh4;
break;
case bfd_mach_sh2: