mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
MetaRegionIterator: avoid reading off end of rectangles array
Fix an off-by-one error in the check for "can we peek ahead to the next rectangle". https://bugzilla.gnome.org/show_bug.cgi?id=636491
This commit is contained in:
parent
544c8edd9e
commit
3f9c375f1c
@ -180,7 +180,7 @@ meta_region_iterator_next (MetaRegionIterator *iter)
|
|||||||
iter->rectangle = iter->next_rectangle;
|
iter->rectangle = iter->next_rectangle;
|
||||||
iter->line_start = iter->line_end;
|
iter->line_start = iter->line_end;
|
||||||
|
|
||||||
if (iter->i < iter->n_rectangles)
|
if (iter->i + 1 < iter->n_rectangles)
|
||||||
{
|
{
|
||||||
cairo_region_get_rectangle (iter->region, iter->i + 1, &iter->next_rectangle);
|
cairo_region_get_rectangle (iter->region, iter->i + 1, &iter->next_rectangle);
|
||||||
iter->line_end = iter->next_rectangle.y != iter->rectangle.y;
|
iter->line_end = iter->next_rectangle.y != iter->rectangle.y;
|
||||||
|
Loading…
Reference in New Issue
Block a user