Use a separate iteration variable for inner loop (:blush:). This
generally prevented any debug directory entries after a
IMAGE_DEBUG_TYPE_CODEVIEW entry from being reported.
Don't leak the memory allocated for the section containing the debug
directory.
bfd/ChangeLog:
2020-01-16 Jon Turney <jon.turney@dronecode.org.uk>
* peXXigen.c (pe_print_debugdata): Fix the iteration variable for
inner loop. Fix a memory leak.
+2020-01-16 Jon Turney <jon.turney@dronecode.org.uk>
+
+ * peXXigen.c (pe_print_debugdata): Fix the iteration variable for
+ inner loop. Fix a memory leak.
+
2020-01-30 Alan Modra <amodra@gmail.com>
* coffgen.c (coff_real_object_p): Don't clear obj_coff_keep_syms
2020-01-30 Alan Modra <amodra@gmail.com>
* coffgen.c (coff_real_object_p): Don't clear obj_coff_keep_syms
asection *section;
bfd_byte *data = 0;
bfd_size_type dataoff;
asection *section;
bfd_byte *data = 0;
bfd_size_type dataoff;
bfd_vma addr = extra->DataDirectory[PE_DEBUG_DATA].VirtualAddress;
bfd_size_type size = extra->DataDirectory[PE_DEBUG_DATA].Size;
bfd_vma addr = extra->DataDirectory[PE_DEBUG_DATA].VirtualAddress;
bfd_size_type size = extra->DataDirectory[PE_DEBUG_DATA].Size;
idd.SizeOfData, cvinfo))
continue;
idd.SizeOfData, cvinfo))
continue;
- for (i = 0; i < cvinfo->SignatureLength; i++)
- sprintf (&signature[i*2], "%02x", cvinfo->Signature[i] & 0xff);
+ for (j = 0; j < cvinfo->SignatureLength; j++)
+ sprintf (&signature[j*2], "%02x", cvinfo->Signature[j] & 0xff);
/* xgettext:c-format */
fprintf (file, _("(format %c%c%c%c signature %s age %ld)\n"),
/* xgettext:c-format */
fprintf (file, _("(format %c%c%c%c signature %s age %ld)\n"),
if (size % sizeof (struct external_IMAGE_DEBUG_DIRECTORY) != 0)
fprintf (file,
_("The debug directory size is not a multiple of the debug directory entry size\n"));
if (size % sizeof (struct external_IMAGE_DEBUG_DIRECTORY) != 0)
fprintf (file,
_("The debug directory size is not a multiple of the debug directory entry size\n"));