bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/21274] New: ld segfaults linking PE DLL


From: kyrab at mail dot ru
Subject: [Bug ld/21274] New: ld segfaults linking PE DLL
Date: Sun, 19 Mar 2017 15:51:47 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=21274

            Bug ID: 21274
           Summary: ld segfaults linking PE DLL
           Product: binutils
           Version: unspecified
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: ld
          Assignee: unassigned at sourceware dot org
          Reporter: kyrab at mail dot ru
  Target Milestone: ---

Created attachment 9907
  --> https://sourceware.org/bugzilla/attachment.cgi?id=9907&action=edit
patch

`ld` segfaults when linking C++ PE DLL.

The culprit is pretty much trivial: `pe_create_import_fixup` uses fixed-sized
buffer to create mangled names, but this buffer is too small (300 bytes) and is
easily overflowed by long mangled names.

Quick patch is attached. I bumped the size of the buffer to more sane 2048
bytes. Since `gcc` doesn't limit identifier length, a proper fix would be
slightly more involved, but I didn't bother with it, sorry.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]