Blame SOURCES/evolution-data-server-3.22.7-use-after-free-component-summary-set.patch
|
|
56e8d5 |
diff -up evolution-data-server-3.22.7/calendar/libecal/e-cal-component.c.use-after-free-component-summary-set evolution-data-server-3.22.7/calendar/libecal/e-cal-component.c
|
|
|
56e8d5 |
--- evolution-data-server-3.22.7/calendar/libecal/e-cal-component.c.use-after-free-component-summary-set 2017-03-20 10:07:46.000000000 +0100
|
|
|
56e8d5 |
+++ evolution-data-server-3.22.7/calendar/libecal/e-cal-component.c 2017-04-12 12:37:17.319310071 +0200
|
|
|
56e8d5 |
@@ -4468,7 +4468,7 @@ e_cal_component_get_summary (ECalCompone
|
|
|
56e8d5 |
}
|
|
|
56e8d5 |
|
|
|
56e8d5 |
typedef struct {
|
|
|
56e8d5 |
- const gchar *old_summary;
|
|
|
56e8d5 |
+ gchar *old_summary;
|
|
|
56e8d5 |
const gchar *new_summary;
|
|
|
56e8d5 |
} SetAlarmDescriptionData;
|
|
|
56e8d5 |
|
|
|
56e8d5 |
@@ -4559,7 +4559,8 @@ e_cal_component_set_summary (ECalCompone
|
|
|
56e8d5 |
g_return_if_fail (summary->value != NULL);
|
|
|
56e8d5 |
|
|
|
56e8d5 |
if (priv->summary.prop) {
|
|
|
56e8d5 |
- sadd.old_summary = icalproperty_get_summary (priv->summary.prop);
|
|
|
56e8d5 |
+ /* Make a copy, to avoid use-after-free */
|
|
|
56e8d5 |
+ sadd.old_summary = g_strdup (icalproperty_get_summary (priv->summary.prop));
|
|
|
56e8d5 |
icalproperty_set_summary (priv->summary.prop, (gchar *) summary->value);
|
|
|
56e8d5 |
} else {
|
|
|
56e8d5 |
sadd.old_summary = NULL;
|
|
|
56e8d5 |
@@ -4589,6 +4590,8 @@ e_cal_component_set_summary (ECalCompone
|
|
|
56e8d5 |
/* look for alarms that need a description */
|
|
|
56e8d5 |
sadd.new_summary = summary->value;
|
|
|
56e8d5 |
g_hash_table_foreach (priv->alarm_uid_hash, set_alarm_description_cb, &sadd);
|
|
|
56e8d5 |
+
|
|
|
56e8d5 |
+ g_free (sadd.old_summary);
|
|
|
56e8d5 |
}
|
|
|
56e8d5 |
|
|
|
56e8d5 |
/**
|