This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH] Fix gdb_bfd_section_index() for special sections
- From: Pedro Alves <palves at redhat dot com>
- To: Andrzej Kaczmarek <andrzej dot kaczmarek at tieto dot com>, gdb-patches at sourceware dot org
- Date: Fri, 27 Mar 2015 12:41:41 +0000
- Subject: Re: [PATCH] Fix gdb_bfd_section_index() for special sections
- Authentication-results: sourceware.org; auth=none
- References: <1426602364-4984-1-git-send-email-andrzej dot kaczmarek at tieto dot com>
On 03/17/2015 02:26 PM, Andrzej Kaczmarek wrote:
> Indexes returned for special sections are off by one, i.e. with N+4
> sections last one has index N+4 returned which is outside allocated
> obstack (at the same time index N is not used at all).
> In worst case, if sections obstack is allocated up to end of chunk,
> writing last section data will cause buffer overrun and some data
Regression tested on x86_64 Fedora 20, and pushed.