diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-01-23 19:48:52 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-01-23 19:48:52 -0500 |
commit | b5031e6e57c9462097db5c58f3a2f6293e9625ff (patch) | |
tree | 77dff5d8f6d431abb4240af4c50b6ac32a1397aa /pango/pango-attributes.c | |
parent | f7f15d079ec5e4716d88ff5796dcfa9a2e1629e8 (diff) | |
download | pango-b5031e6e57c9462097db5c58f3a2f6293e9625ff.tar.gz |
Add some preconditions
The arguments to pango_attr_list_update are ints,
but negative numbers don't make sense here.
Diffstat (limited to 'pango/pango-attributes.c')
-rw-r--r-- | pango/pango-attributes.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pango/pango-attributes.c b/pango/pango-attributes.c index 4f96135b..38a41517 100644 --- a/pango/pango-attributes.c +++ b/pango/pango-attributes.c @@ -1697,6 +1697,10 @@ pango_attr_list_update (PangoAttrList *list, { guint i, p; + g_return_if_fail (pos >= 0); + g_return_if_fail (remove >= 0); + g_return_if_fail (add >= 0); + if (list->attributes) for (i = 0, p = list->attributes->len; i < p; i++) { |