mirror of
https://gitlab.freedesktop.org/upower/upower.git
synced 2025-12-25 08:00:04 +01:00
up-polkit: Add G_ADD_PRIVATE (UpPolkit)
Without this, accesses to `UpPolkitPrivate` are actually out of bounds and writing to it will cause heap corruption. Fixes: https://gitlab.freedesktop.org/upower/upower/-/issues/281
This commit is contained in:
parent
b71996a526
commit
b4697dbc62
1 changed files with 2 additions and 1 deletions
|
|
@ -43,7 +43,8 @@ struct UpPolkitPrivate
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE (UpPolkit, up_polkit, G_TYPE_OBJECT)
|
G_DEFINE_TYPE_WITH_CODE (UpPolkit, up_polkit, G_TYPE_OBJECT,
|
||||||
|
G_ADD_PRIVATE (UpPolkit))
|
||||||
static gpointer up_polkit_object = NULL;
|
static gpointer up_polkit_object = NULL;
|
||||||
|
|
||||||
#ifdef HAVE_POLKIT
|
#ifdef HAVE_POLKIT
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue