This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fixed issue with NULL pointer access on header var.


Hi Nick,

On 08/30/2016 03:16 PM, Nick Clifton wrote:
> Given that 'header' is only ever used in this particular case, why
> not move the declaration and initialisation of header here as well ?
With your permission, I would prefer not to make a bigger change in
Claudius code, and leave it for him to analyze when he gets back. Just
to avoid removing some code he might be planning to use.
I propose to include the following TODO message there.

Best regards,
Cupertino


diff --git a/opcodes/arc-dis.c b/opcodes/arc-dis.c
index da136a1..87c1921 100644
--- a/opcodes/arc-dis.c
+++ b/opcodes/arc-dis.c
@@ -938,6 +938,8 @@ print_insn_arc (bfd_vma memaddr,
     case bfd_mach_arc_arcv2:
     default:
       isa_mask = ARC_OPCODE_ARCv2EM;
+      /* TODO: Perhaps remove definition of header since it is only used at
+         this location.  */
       if (header != NULL
          && (header->e_flags & EF_ARC_MACH_MSK) == EF_ARC_CPU_ARCV2HS)
        {




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]