diff options
author | Matthias Clasen <mclasen@redhat.com> | 2022-03-19 04:17:55 +0000 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2022-03-19 04:17:55 +0000 |
commit | a229f11f332f7038bfcaeb3c74b34f6e0c0e0e70 (patch) | |
tree | 91a729f073a340c2563dcb1053fa48b110e87617 /pango | |
parent | 74e437bc6502aae80b3a3a9b0775cbd841665617 (diff) | |
parent | 5de30b596bd4b2b65715fc283264448127ca4b61 (diff) | |
download | pango-a229f11f332f7038bfcaeb3c74b34f6e0c0e0e70.tar.gz |
Merge branch 'attr-list-bad-access' into 'main'
AVoid a use-after-free in pango_attr_list_change
Closes #678
See merge request GNOME/pango!603
Diffstat (limited to 'pango')
-rw-r--r-- | pango/pango-attributes.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pango/pango-attributes.c b/pango/pango-attributes.c index 4d7111fa..20809afc 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)) { |