This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB 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]

[patch/commit] merge add_filename_language fix to 5.2 branch


This patch is working fine in mainline.  I'm committing it to the 5.2 branch.

I tested gdb 5.2 before and after to check the effectiveness of the fix.
I also regression tested this on my native i686-pc-linux-gnu testbed.

I got interested in this because I'm cleaning up old PR's.  This bug
was reported to us in PR gdb/172 in July 2001 -- including the appropriate
fix!

Michael C

2002-04-30  Michael Chastain  <mec@shout.net>

	Merge from trunk.  This also fixes PR gdb/172.

	2002-04-25  Pierre Muller  <muller@ics.u-strasbg.fr>

	Fix PR gdb/508.
	* symfile.c (add_filename_language): Fix wrong xrealloc size argument.

Index: symfile.c
===================================================================
RCS file: /cvs/src/src/gdb/symfile.c,v
retrieving revision 1.54
diff -c -3 -p -r1.54 symfile.c
*** symfile.c	27 Feb 2002 01:40:36 -0000	1.54
--- symfile.c	1 May 2002 01:15:37 -0000
*************** add_filename_language (char *ext, enum l
*** 1806,1813 ****
    if (fl_table_next >= fl_table_size)
      {
        fl_table_size += 10;
!       filename_language_table = xrealloc (filename_language_table,
! 					  fl_table_size);
      }
  
    filename_language_table[fl_table_next].ext = xstrdup (ext);
--- 1806,1814 ----
    if (fl_table_next >= fl_table_size)
      {
        fl_table_size += 10;
!       filename_language_table = 
! 	xrealloc (filename_language_table,
! 		  fl_table_size * sizeof (*filename_language_table));
      }
  
    filename_language_table[fl_table_next].ext = xstrdup (ext);


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