i386: Align branches within a fixed boundary
[deliverable/binutils-gdb.git] / bfd / pef.c
index 8c66ca477d41a9f8ac3dc60d276b820bccb0e828..fccb9b6ac38aba7fa2c820e280887c20945d35b0 100644 (file)
--- a/bfd/pef.c
+++ b/bfd/pef.c
@@ -56,6 +56,7 @@
 #define bfd_pef_bfd_lookup_section_flags           bfd_generic_lookup_section_flags
 #define bfd_pef_bfd_merge_sections                 bfd_generic_merge_sections
 #define bfd_pef_bfd_is_group_section               bfd_generic_is_group_section
+#define bfd_pef_bfd_group_name                     bfd_generic_group_name
 #define bfd_pef_bfd_discard_group                  bfd_generic_discard_group
 #define bfd_pef_section_already_linked             _bfd_generic_section_already_linked
 #define bfd_pef_bfd_define_common_symbol           bfd_generic_define_common_symbol
@@ -220,15 +221,16 @@ bfd_pef_print_symbol (bfd *abfd,
       fprintf (file, " %-5s %s", symbol->section->name, symbol->name);
       if (CONST_STRNEQ (symbol->name, "__traceback_"))
        {
-         unsigned char *buf = xmalloc (symbol->udata.i);
+         unsigned char *buf;
          size_t offset = symbol->value + 4;
          size_t len = symbol->udata.i;
-         int ret;
 
-         bfd_get_section_contents (abfd, symbol->section, buf, offset, len);
-         ret = bfd_pef_parse_traceback_table (abfd, symbol->section, buf,
-                                              len, 0, NULL, file);
-         if (ret < 0)
+         buf = bfd_malloc (len);
+         if (buf == NULL
+             || !bfd_get_section_contents (abfd, symbol->section, buf,
+                                           offset, len)
+             || bfd_pef_parse_traceback_table (abfd, symbol->section, buf,
+                                               len, 0, NULL, file) < 0)
            fprintf (file, " [ERROR]");
          free (buf);
        }
This page took 0.025333 seconds and 4 git commands to generate.