X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=bfd%2Fpei-x86_64.c;h=c19b9461ada77943f2b8907e7638f665e439bb8d;hb=e94321588dab8a50728b5c625f0045b4d1e732a3;hp=2009a2962a742ab704baa75291ae9cf589ef4dd4;hpb=de0d78958fe3db5184c5a7174f55f08d41c8706b;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/pei-x86_64.c b/bfd/pei-x86_64.c index 2009a2962a..c19b9461ad 100644 --- a/bfd/pei-x86_64.c +++ b/bfd/pei-x86_64.c @@ -1,5 +1,5 @@ /* BFD back-end for Intel 386 PE IMAGE COFF files. - Copyright (C) 2006-2014 Free Software Foundation, Inc. + Copyright (C) 2006-2016 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -346,7 +346,7 @@ pex64_dump_xdata (FILE *file, bfd *abfd, end_addr = sec_size; pex64_get_unwind_info (abfd, &ui, &xdata[addr]); - + if (ui.Version != 1 && ui.Version != 2) { unsigned int i; @@ -602,7 +602,7 @@ pex64_bfd_print_pdata_section (bfd *abfd, void *vfile, asection *pdata_section) if (strcmp (pdata_section->name, ".pdata") != 0) { size_t len = strlen (pdata_section->name); - char *xdata_name = alloca (len + 1); + char *xdata_name = xmalloc (len + 1); xdata_name = memcpy (xdata_name, pdata_section->name, len + 1); /* Transform .pdata prefix into .xdata prefix. */ @@ -610,6 +610,7 @@ pex64_bfd_print_pdata_section (bfd *abfd, void *vfile, asection *pdata_section) xdata_name [1] = 'x'; xdata_section = pex64_get_section_by_rva (abfd, xdata_base, xdata_name); + free (xdata_name); } /* Second, try the .xdata section itself. */ if (!xdata_section)