summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pango/pango-attributes.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/pango/pango-attributes.c b/pango/pango-attributes.c
index 38a41517..3ef76a70 100644
--- a/pango/pango-attributes.c
+++ b/pango/pango-attributes.c
@@ -1733,7 +1733,10 @@ pango_attr_list_update (PangoAttrList *list,
}
else if (attr->end_index >= pos + remove)
{
- attr->end_index += add - remove;
+ if (G_MAXUINT - attr->end_index < add - remove)
+ attr->end_index = G_MAXUINT;
+ else
+ attr->end_index += add - remove;
}
}
}