Fix use-after-free in GcalManager code
This was originally discovered and fixed by Milan Crha; I'm just forward-porting his fix to the master branch. self->clients takes ownership of this source but we don't currently have ownership here, leading to a double free vulnerability. Fixes #435
This commit is contained in:
committed by
Georges Basile Stavracas Neto
parent
5fd4c91e2b
commit
5d2c0faf41
@@ -269,7 +269,7 @@ on_calendar_created_cb (GObject *source_object,
|
||||
client = gcal_calendar_get_client (calendar);
|
||||
source = gcal_calendar_get_source (calendar);
|
||||
|
||||
g_hash_table_insert (self->clients, source, calendar);
|
||||
g_hash_table_insert (self->clients, g_object_ref (source), calendar);
|
||||
|
||||
if (visible)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user