mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
libsysprof: elf: do not allow setting self as debug link
That will cause infinite recursion in `sysprof_elf_get_symbol_at_address_internal()`. Also note that loops are still possible, this change only prevents one way of creating loops.
This commit is contained in:
committed by
Christian Hergert
parent
e0fdbf65cf
commit
aef623cf15
@ -502,6 +502,7 @@ sysprof_elf_set_debug_link_elf (SysprofElf *self,
|
|||||||
{
|
{
|
||||||
g_return_if_fail (SYSPROF_IS_ELF (self));
|
g_return_if_fail (SYSPROF_IS_ELF (self));
|
||||||
g_return_if_fail (!debug_link_elf || SYSPROF_IS_ELF (debug_link_elf));
|
g_return_if_fail (!debug_link_elf || SYSPROF_IS_ELF (debug_link_elf));
|
||||||
|
g_return_if_fail (debug_link_elf != self);
|
||||||
|
|
||||||
if (g_set_object (&self->debug_link_elf, debug_link_elf))
|
if (g_set_object (&self->debug_link_elf, debug_link_elf))
|
||||||
g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_DEBUG_LINK_ELF]);
|
g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_DEBUG_LINK_ELF]);
|
||||||
|
|||||||
Reference in New Issue
Block a user