Bug 8915 - xscreensaver hack "epicycle" dumps core
Summary: xscreensaver hack "epicycle" dumps core
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: xscreensaver   
(Show other bugs)
Version: 6.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-01-27 10:28 UTC by jay
Modified: 2014-03-17 02:12 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-01-31 17:26:50 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description jay 2000-01-27 10:28:26 UTC
The "epicycle" screenhack will dump core when given the option
"-max_circles 2".

NOTE: This affects all versions of xscreensaver since 2.18.

The following patch fixes this:-




diff -u -r1.1 xscreensaver-3.22/hacks/epicycle.c
--- xscreensaver-3.22/hacks/epicycle.c  2000/01/26 22:36:21     1.1
+++ xscreensaver-3.22/hacks/epicycle.c  2000/01/26 22:39:58
@@ -266,7 +266,10 @@

   /* There are between minCircles and maxCircles in each figure.
    */
-  n = minCircles + random() % (maxCircles - minCircles);
+  if (maxCircles == minCircles)
+    n = minCircles;            /* Avoid division by zero. */
+  else
+    n = minCircles + random() % (maxCircles - minCircles);

   head = NULL;
   while (n--)

Comment 1 Bill Nottingham 2000-01-31 17:26:59 UTC
Fixed in 3.23-1.


Note You need to log in before you can comment on or make changes to this bug.