http://bugs.gentoo.org/248057 Index: src/modules/loaders/loader_xpm.c =================================================================== --- src/modules/loaders/loader_xpm.c (revision 37743) +++ src/modules/loaders/loader_xpm.c (revision 37744) @@ -253,8 +253,8 @@ load(ImlibImage * im, ImlibProgressFunct return 0; } ptr = im->data; - end = ptr + (sizeof(DATA32) * w * h); pixels = w * h; + end = ptr + (pixels); } else {