[pango/attr-list-bad-access] AVoid a use-after-free in pango_attr_list_change
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/attr-list-bad-access] AVoid a use-after-free in pango_attr_list_change
- Date: Wed, 16 Mar 2022 19:47:59 +0000 (UTC)
commit b545363bdc94f82b7d7208da7a7a2a7cb026981f
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Mar 16 15:46:51 2022 -0400
AVoid a use-after-free in pango_attr_list_change
This was showing up as crashes in pitivi and inkscape.
Fixes: #678
pango/pango-attributes.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/pango/pango-attributes.c b/pango/pango-attributes.c
index 60d14706..3a56f581 100644
--- a/pango/pango-attributes.c
+++ b/pango/pango-attributes.c
@@ -2157,6 +2157,9 @@ pango_attr_list_change (PangoAttrList *list,
if (tmp_attr->klass->type != attr->klass->type)
continue;
+ if (tmp_attr == attr)
+ continue;
+
if (tmp_attr->end_index <= attr->end_index ||
pango_attribute_equal (tmp_attr, attr))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]