diff options
author | Cupertino Miranda <cmiranda@synopsys.com> | 2016-08-26 22:15:23 +0200 |
---|---|---|
committer | Cupertino Miranda <cmiranda@synopsys.com> | 2016-08-30 18:21:13 +0200 |
commit | 7763838e991e4d17a24c4214db5144eefd515543 (patch) | |
tree | 338fdbcd756808384bbde3b17929332bda179c37 /opcodes | |
parent | 5af962df4dda65216b83d0a954ea355296517f4b (diff) | |
download | gdb-7763838e991e4d17a24c4214db5144eefd515543.zip gdb-7763838e991e4d17a24c4214db5144eefd515543.tar.gz gdb-7763838e991e4d17a24c4214db5144eefd515543.tar.bz2 |
Fixed issue with NULL pointer access on header var.
Variable "header" in function is set conditionally, but was accessed without
verifying if pointer was NULL.
opcodes/ChangeLog:
Cupertino Miranda <cmiranda@synopsys.com>
* opcodes/arc-dis.c (print_insn_arc): Changed.
Diffstat (limited to 'opcodes')
-rw-r--r-- | opcodes/ChangeLog | 4 | ||||
-rw-r--r-- | opcodes/arc-dis.c | 5 |
2 files changed, 8 insertions, 1 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 9e41bc5..fdb78af 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,7 @@ +2016-08-30 Cupertino Miranda <cmiranda@synopsys.com> + + * opcodes/arc-dis.c (print_insn_arc): Changed. + 2016-08-26 Jose E. Marchesi <jose.marchesi@oracle.com> * sparc-opc.c (sparc_opcodes): Fix typo in opcode, camellia_fi -> diff --git a/opcodes/arc-dis.c b/opcodes/arc-dis.c index 73d648d..d69a01e 100644 --- a/opcodes/arc-dis.c +++ b/opcodes/arc-dis.c @@ -938,7 +938,10 @@ print_insn_arc (bfd_vma memaddr, case bfd_mach_arc_arcv2: default: isa_mask = ARC_OPCODE_ARCv2EM; - if ((header->e_flags & EF_ARC_MACH_MSK) == EF_ARC_CPU_ARCV2HS) + /* TODO: Perhaps remove defitinion of header since it is only used at + this location. */ + if (header != NULL + && (header->e_flags & EF_ARC_MACH_MSK) == EF_ARC_CPU_ARCV2HS) { isa_mask = ARC_OPCODE_ARCv2HS; /* FPU instructions are not extensions for HS. */ |