[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.
- [Bug ld/21274] New: ld segfaults linking PE DLL,
kyrab at mail dot ru <=
- [Bug ld/21274] ld segfaults linking PE DLL, kyrab at mail dot ru, 2017/03/19
- [Bug ld/21274] ld segfaults linking PE DLL, amodra at gmail dot com, 2017/03/19
- [Bug ld/21274] ld segfaults linking PE DLL, kyrab at mail dot ru, 2017/03/20
- [Bug ld/21274] ld segfaults linking PE DLL, amodra at gmail dot com, 2017/03/20
- [Bug ld/21274] ld segfaults linking PE DLL, kyrab at mail dot ru, 2017/03/20