Overflow in the pango-attributes.c: pango_attr_list_update function.
Hello,
Considering that I have a PangoAttrList with a PangoAttr start_index at 0 and end_index at npos (4294967295) and I want to change the start reference by 3.
I would call the function:
pango_attr_list_update(attrs, 0, 0, 3) // (adding 3 and removing 0)
The current implementation of this function will do:
... Line 1668:
else if (attr->end_index >= pos + remove) { attr->end_index += add - remove; }
Which will generate a overflow in the end_index variable that would become 3 instead of up to the end to the string as intended. I think that the function should not change the end_index if it is euqal to npos, right? Like this:
if (attr->end_index != G_MAXUINT) { attr->end_index += add - remove; }