[PATCH][gdb] Fix heap-buffer-overflow in cp_find_first_component_aux

Simon Marchi simon.marchi@polymtl.ca
Fri May 31 12:54:00 GMT 2019


On 2019-05-29 2:55 p.m., Tom Tromey wrote:
>>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:
> 
> Tom> [gdb] Fix heap-buffer-overflow in cp_find_first_component_aux
> 
> Tom> gdb/ChangeLog:
> 
> Tom> 2019-05-25  Tom de Vries  <tdevries@suse.de>
> 
> Tom> 	PR gdb/24618
> Tom> 	* dwarf2read.c (struct mapped_index::symbol_name_slot_invalid): Make
> Tom> 	sure an empty slot (defined by a 32-bit zero pair) is recognized as
> Tom> 	invalid.
> 
> Thanks for the patch and the excellent analysis.
> 
> I looked at the history here a little and the earlier code did:
> 
> -      if (bucket.name == 0 && bucket.vec == 0)
> 
> ... so this seems to have just been a simple error in the patch.
> 
> This is ok, please check it in.
> 
> Tom

Agreed, I was able to reproduce the failure, and the fix LGTM.

Simon



More information about the Gdb-patches mailing list