[gdb] Fix heap-buffer-overflow in cp_find_first_component_aux