Skip to content

px_proxy_factory_copy doesn't increment refcount of the underlying proxy manager #280

@smcv

Description

@smcv

To reproduce:

  • create a proxy factory
  • duplicate it
  • free both the original and the duplicate

Expected result: no runtime errors

Actual result: Whichever proxy factory is freed first is freed successfully, destroying the underlying proxy manager. Now the other proxy factory has a dangling pointer to a freed proxy manager. When the second proxy factory is freed, GLib will make an attempt to throw a critical warning:

not ok /libproxy/dup - GLib-GObject-FATAL-CRITICAL: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

but this is undefined behaviour, so it might equally well just crash.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions