This is the mail archive of the binutils@sources.redhat.com 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]

Bug in xsym.c ?


Hi Klee,

  I ran across a problem compiling bfd/xsym.c on a Solaris platform
  the other day.  The function bfd_sym_fetch_type_information_table_ent()
  was testing a variable called 'index' which is not defined.  It was
  not clear from the context what the test was supposed to be doing,
  but my best guess was that it was intended to check that a parameter
  called 'entry' was non-NULL.

  I created a patch like this.  Is it correct ?

Cheers
        Nick


Index: bfd/xsym.c
===================================================================
RCS file: /cvs/src/src/bfd/xsym.c,v
retrieving revision 1.3
diff -c -3 -p -w -r1.3 xsym.c
*** bfd/xsym.c	30 Nov 2002 08:39:40 -0000	1.3
--- bfd/xsym.c	5 Mar 2003 08:59:48 -0000
*************** bfd_sym_fetch_type_information_table_ent
*** 1131,1137 ****
    BFD_ASSERT (bfd_sym_valid (abfd));
    sdata = abfd->tdata.sym_data;
  
!   if (index == 0)
      return -1;
  
    if (bfd_seek (abfd, offset, SEEK_SET) < 0)
--- 1131,1137 ----
    BFD_ASSERT (bfd_sym_valid (abfd));
    sdata = abfd->tdata.sym_data;
  
!   if (entry == 0)
      return -1;
  
    if (bfd_seek (abfd, offset, SEEK_SET) < 0)


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