X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fglx%2Fgrab-ximage.c;h=9fca3c811eccff0e2f1fddabeae93e9f52c6a3a2;hb=7b34ef992563d7bcbb64cc5597dc45fa24470b05;hp=063e9e313dda407f1f4cddb30d56d68fb5887f22;hpb=6b1c86cf395f59389e4ece4ea8f4bea2c332745b;p=xscreensaver diff --git a/hacks/glx/grab-ximage.c b/hacks/glx/grab-ximage.c index 063e9e31..9fca3c81 100644 --- a/hacks/glx/grab-ximage.c +++ b/hacks/glx/grab-ximage.c @@ -145,7 +145,7 @@ convert_ximage_to_rgba32 (Screen *screen, XImage *image) XColor *colors = 0; unsigned char spread_map[3][256]; - /* Note: height+2 in "to" to be to work around an array bounds overrun + /* Note: height+2 in "to" to work around an array bounds overrun in gluBuild2DMipmaps / gluScaleImage. */ XImage *from = image; @@ -201,6 +201,10 @@ convert_ximage_to_rgba32 (Screen *screen, XImage *image) } } + /* trying to track down an intermittent crash in ximage_putpixel_32 */ + if (to->width < from->width) abort(); + if (to->height < from->height) abort(); + for (y = 0; y < from->height; y++) for (x = 0; x < from->width; x++) {