Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Nov 2008 20:41:36 -0800
From:      David Wolfskill <david@catwhisker.org>
To:        ports@freebsd.org
Subject:   [david@catwhisker.org: Re: Heads up: Another bug in piewm (and not in tvtwm)]
Message-ID:  <20081123044136.GA37853@bunrab.catwhisker.org>

next in thread | raw e-mail | index | archive | help

--98e8jtXdkpgskNou
Content-Type: multipart/mixed; boundary="HcAYCG3uE/tztfnV"
Content-Disposition: inline


--HcAYCG3uE/tztfnV
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

FYI -- I found a bug (described below) in x11-wm/piewm; I removed the
patch from the forwarded copy of the message I sent to Russ Nelson, and
have attached it to this one for convenience -- just in case there's
anyone else out there who still uses piewm.  :-}

I have not created a FreeBSD PR for this, but I can, if that's desired.

----- Forwarded message from David Wolfskill <david@catwhisker.org> -----

Date: Sat, 22 Nov 2008 12:29:10 -0800
From: David Wolfskill <david@catwhisker.org>
To: Russell Nelson <nelson@crynwr.com>
Subject: Re: Heads up: Another bug in piewm (and not in tvtwm)

On Sat, Nov 22, 2008 at 11:52:39AM -0800, David Wolfskill wrote:
> I don't have a patch yet, but the problem is in InstallWindowColormaps()
> in events.c.
>=20
> If, while running piewm, one fires up Xnest, piewm gets a SIGSEGV
> in InstallWindowColormaps, at events.c:2601 when the mouse travels
> over the Xnest window:
>...=20
> I'm hoping to have a patch before the weekend is out, but I confess
> that I'm not all that familiar with the code.
>=20
> ....

OK; the attached patch appears to prevent the problem.

The problem appears to be that the loop control variable, n, is being
decremented only within a conditional block; when there are "cwin"s that
fail to meet the condition, it isn't decremented, so the loop goes
further than it's supposed to.  (In the case in point, n started out as
2, and the 3rd iteration of the loop had a bit of a problem, as by thta
point, maxcwin would be pointiing to cwins[-1].  Urrgh.)

Peace,
david
--=20
David H. Wolfskill				david@catwhisker.org
Depriving a girl or boy of an opportunity for education is evil.

See http://www.catwhisker.org/~david/publickey.gpg for my public key.

----- End forwarded message -----

Peace,
david
--=20
David H. Wolfskill				david@catwhisker.org
Depriving a girl or boy of an opportunity for education is evil.

See http://www.catwhisker.org/~david/publickey.gpg for my public key.

--HcAYCG3uE/tztfnV
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="events.c.diff"
Content-Transfer-Encoding: quoted-printable

--- events.c.orig	1998-01-07 22:11:39.000000000 -0800
+++ events.c	2008-11-22 12:13:35.000000000 -0800
@@ -2606,8 +2606,8 @@
 		XInstallColormap(dpy, cmap->c);
 	    }
 	    cmap->state |=3D CM_INSTALLED;
-	    n--;
 	}
+        n--;
     }
 }
=20

--HcAYCG3uE/tztfnV--

--98e8jtXdkpgskNou
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (FreeBSD)

iEYEARECAAYFAkko3v8ACgkQmprOCmdXAD1VNQCfUluQSXWqy1yRQPGcGEu7T4rd
bKAAn2gggjbLZpBYDSrfm64ZdtSNsXSG
=IWOF
-----END PGP SIGNATURE-----

--98e8jtXdkpgskNou--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20081123044136.GA37853>