bug in ignore plugin + patch to fix
John Bailey
rekkanoryo at rekkanoryo.org
Thu Oct 4 19:59:53 CDT 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
As a list administrator, I received this automatically discarded message from
the list daemon. I'm forwarding it on here so the appropriate people can look
over it.
I have pre-sanitized the diff by dos2unix'ing it, as there were ^M characters
littered throughout the diff at the insertion points.
John
- --------- Original Message --------
Subject: bug+fix ignore.c broken for screen names with spaces in them
Date: Thu, 4 Oct 2007 12:06:34 -0400
From: Keith Gabryelski <keith at gabryelski.com>
To: plugins-devel at lists.guifications.org
the crashes seemed to occur because the preferences lookup routines
couldn't find paths
whose components had spaces in them.
To reproduce:
1) Remove the ignore node from your preferences file.
2) Sign in on AIM with a space in your name, for me I can sign in as
"keith gabryelski" or "keithgabryelski"
3) Open a msg to buddy: "AOL System Msg"
4) type: /ignore +
Notice: messages from AOL System Msg are NOT ignored
5) Now type: /ignore
Notice: *crash* null pointer exception because
purple_prefs_get_string(...) returns NULL in list_ignore_rules().
To solve this, I adjusted the names by using a "+" in place of a space.
There are a few more allocs in the code (with down casing and the
adjustment mentioned -- no idea if the downcasing
was necessary).
I believe I freed as appropriate.
I may have used too large of a hammer.
It works.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFHBYyJBWJH/emdNtsRAv9jAJ98tch+bv0xIvwPPz5gcIQX/ffTnACgxQxu
S4+i1kOok9rTlWUH0fC/tnk=
=326K
-----END PGP SIGNATURE-----
More information about the Plugins-devel
mailing list