pidgin: cb46b045: Fix a crash when attempting to validate ...
darkrain42 at pidgin.im
darkrain42 at pidgin.im
Wed Sep 9 16:02:11 EDT 2009
-----------------------------------------------------------------
Revision: cb46b045aa6e927a3814d9053c2b1c0f08d6fa62
Ancestor: 8416dfa366e9035338764be66def87d4410a29aa
Author: darkrain42 at pidgin.im
Date: 2009-09-09T19:56:39
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/cb46b045aa6e927a3814d9053c2b1c0f08d6fa62
Modified files:
ChangeLog libpurple/protocols/jabber/jutil.c
libpurple/tests/test_jabber_jutil.c
ChangeLog:
Fix a crash when attempting to validate a JID with an invalid resource.
-------------- next part --------------
============================================================
--- ChangeLog 959824a520d41286c4d89d8899a8e12b684e5ad8
+++ ChangeLog 6e78b15060f29fe30ae1b695f61248014b305d49
@@ -1,5 +1,9 @@ Pidgin and Finch: The Pimpin' Penguin IM
Pidgin and Finch: The Pimpin' Penguin IM Clients That're Good for the Soul
+version 2.6.3 (??/??/20??):
+ XMPP:
+ * Fix a crash when attempting to validate an invalid JID.
+
version 2.6.2 (09/05/2009):
libpurple:
* Fix --disable-avahi to actually disable it in configure, as opposed
============================================================
--- libpurple/protocols/jabber/jutil.c 9047c2dfd575de6ec516dd8377bce70df42d5063
+++ libpurple/protocols/jabber/jutil.c 603120abe6629d5e8f9e79d5198134bb252b0875
@@ -153,10 +153,9 @@ jabber_idn_validate(const char *str, con
if (!jabber_resourceprep(idn_buffer, sizeof(idn_buffer))) {
jabber_id_free(jid);
jid = NULL;
- /* goto out; */
- }
-
- jid->resource = g_strdup(idn_buffer);
+ goto out;
+ } else
+ jid->resource = g_strdup(idn_buffer);
}
out:
============================================================
--- libpurple/tests/test_jabber_jutil.c 38e36ccd4fbf2682828c201fe178cd637217fc25
+++ libpurple/tests/test_jabber_jutil.c 42bdbb36f39b7d894d5f6f68e1b02f4c1ce4973a
@@ -132,6 +132,7 @@ START_TEST(test_jabber_id_new)
assert_invalid_jid("mark.doliner at gmail\\stuff.org");
assert_invalid_jid("paul@[::1]124");
assert_invalid_jid("paul at 2[::1]124/as");
+ assert_invalid_jid("paul@??.????/\x01");
/* Ensure that jabber_id_new is properly lowercasing node and domains */
assert_jid_parts("paul", "darkrain42.org", "PaUL at darkrain42.org");
More information about the Commits
mailing list