# HG changeset patch # User Florian QuŹ«˛ze # Date 1229313748 0 # Node ID d1da5c4c1e6bde825585f4bb33b8cecc88da9ac8 # Parent 08414e3d8b4f0177ae910d6ffb3b384e80735276 Fix a crash in DNS SRV resolution when one of the required parameters is NULL. Fixes #7765. committer: John Bailey diff -r 08414e3d8b4f -r d1da5c4c1e6b ChangeLog --- a/ChangeLog Mon Dec 15 03:54:39 2008 +0000 +++ b/ChangeLog Mon Dec 15 04:02:28 2008 +0000 @@ -21,6 +21,7 @@ (JaromĂ­r KarmazĂ­n) * Many QQ fixes and improvements, including the ability to connect using QQ2008 protocol and sending/receiving of long messages. + * Fix a crash with DNS SRV lookups (Florian Quèze) Gadu-Gadu: * Fix some problems with Gadu-Gadu buddy icons (Adam Strzelecki) diff -r 08414e3d8b4f -r d1da5c4c1e6b libpurple/dnssrv.c --- a/libpurple/dnssrv.c Mon Dec 15 03:54:39 2008 +0000 +++ b/libpurple/dnssrv.c Mon Dec 15 04:02:28 2008 +0000 @@ -336,6 +336,12 @@ static gboolean initialized = FALSE; #endif + if (!protocol || !*protocol || !transport || !*transport || !domain || !*domain) { + purple_debug_error("dnssrv", "Wrong arguments\n"); + cb(NULL, 0, extradata); + g_return_val_if_reached(NULL); + } + query = g_strdup_printf("_%s._%s.%s", protocol, transport, domain); purple_debug_info("dnssrv","querying SRV record for %s\n", query);