Blob Blame History Raw
--- xscreensaver-5.10/hacks/substrate.c.debug	2008-07-31 19:19:57.000000000 +0900
+++ xscreensaver-5.10/hacks/substrate.c	2009-12-10 03:01:06.000000000 +0900
@@ -198,6 +198,13 @@
         /* We timed out.  Use our default values */
         px = cr->x;
         py = cr->y;
+
+        /* Sanity check needed */
+        if (px < 0) px = 0;
+        if (px >= f->width) px = f->width - 1;
+        if (py < 0) py = 0;
+        if (py >= f->height) py = f->height - 1;
+
         ref_cgrid(f, px, py) = cr->t;
     }