From 25bf3106359b27b442533f51e3ab3c2f9e62f1a1 Mon Sep 17 00:00:00 2001 From: Pierre Muller Date: Thu, 25 Apr 2002 16:29:27 +0000 Subject: [PATCH] 2002-04-25 Pierre Muller Fix PR gdb/508. * symfile.c (add_filename_language): Fix wrong xrealloc size argument. --- gdb/ChangeLog | 5 +++++ gdb/symfile.c | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 1ae21c44eed..a005eac2345 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2002-04-25 Pierre Muller + + Fix PR gdb/508. + * symfile.c (add_filename_language): Fix wrong xrealloc size argument. + 2002-04-25 Pierre Muller * p-exp.y: Also use new prev_lexptr variable diff --git a/gdb/symfile.c b/gdb/symfile.c index 2671770d17b..7c7141d7b86 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -1831,8 +1831,9 @@ add_filename_language (char *ext, enum language lang) if (fl_table_next >= fl_table_size) { fl_table_size += 10; - filename_language_table = xrealloc (filename_language_table, - fl_table_size); + filename_language_table = + xrealloc (filename_language_table, + fl_table_size * sizeof (*filename_language_table)); } filename_language_table[fl_table_next].ext = xstrdup (ext); -- 2.30.2