diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-05-23 16:47:30 +0000 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-05-23 16:47:30 +0000 |
commit | 3276a33b1ef9db42d46bf649d693016c4587f368 (patch) | |
tree | 4ff0402df2dcf9f3a982101d3971304bc46deb68 /pango | |
parent | 27b4ae6596c3d4ef6d11baff78300c18331f6349 (diff) | |
parent | dad38adf4e8a7ca6fbbe09d8eba0c25aa0a393d4 (diff) | |
download | pango-3276a33b1ef9db42d46bf649d693016c4587f368.tar.gz |
Merge branch 'fix-attr-list-update' into 'master'
Avoid unsigned int pitfalls
Closes #561
See merge request GNOME/pango!336
Diffstat (limited to 'pango')
-rw-r--r-- | pango/pango-attributes.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pango/pango-attributes.c b/pango/pango-attributes.c index 63c031f9..f97892a6 100644 --- a/pango/pango-attributes.c +++ b/pango/pango-attributes.c @@ -1777,7 +1777,8 @@ pango_attr_list_update (PangoAttrList *list, } else if (attr->end_index >= pos + remove) { - if (G_MAXUINT - attr->end_index < add - remove) + if (add > remove && + G_MAXUINT - attr->end_index < add - remove) attr->end_index = G_MAXUINT; else attr->end_index += add - remove; |