mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-13 14:00:09 +00:00
Allocate a large-enough and mask
We came up short when the image width is not a multiple of 8. Bug 585383, fix by Felix Riemann.
This commit is contained in:
parent
36ca3fd5e9
commit
869ee7f232
@ -1011,12 +1011,12 @@ fill_entry (IconEntry *icon,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if ((icon->xor_rowstride % 4) != 0)
|
||||
if ((icon->xor_rowstride % 4) != 0)
|
||||
icon->xor_rowstride = 4 * ((icon->xor_rowstride / 4) + 1);
|
||||
icon->xor = g_new0 (guchar, icon->xor_rowstride * icon->height);
|
||||
|
||||
icon->and_rowstride = icon->width / 8;
|
||||
if ((icon->and_rowstride % 4) != 0)
|
||||
icon->and_rowstride = (icon->width + 7) / 8;
|
||||
if ((icon->and_rowstride % 4) != 0)
|
||||
icon->and_rowstride = 4 * ((icon->and_rowstride / 4) + 1);
|
||||
icon->and = g_new0 (guchar, icon->and_rowstride * icon->height);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user