This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: RFC: Add --compress-debug-sections=[none|zlib|zlib-gnu|zlib-gabi] to ld
- From: Alan Modra <amodra at gmail dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Mon, 13 Apr 2015 10:43:48 +0930
- Subject: Re: RFC: Add --compress-debug-sections=[none|zlib|zlib-gnu|zlib-gabi] to ld
- Authentication-results: sourceware.org; auth=none
- References: <20150409220720 dot GA9996 at intel dot com>
On Thu, Apr 09, 2015 at 03:07:20PM -0700, H.J. Lu wrote:
> + if (arg->link_info
> + && (arg->link_info->compress_debug & COMPRESS_DEBUG)
> + && arg->link_info->compress_debug != COMPRESS_DEBUG_GABI_ZLIB
> + && (asect->flags & SEC_DEBUGGING)
> + && name[1] == 'd'
> + && name[6] == '_')
Here and in a couple of other places you omit checking the full prefix
of the name. Are you certain you won't see something like a ".de"
section here? It you might, then name[6] is a buffer overflow and a
potential segfault.
--
Alan Modra
Australia Development Lab, IBM