This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix gdb_bfd_section_index() for special sections


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
> corruption.

Regression tested on x86_64 Fedora 20, and pushed.

Thanks,
-- 
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]