Mercurial > pidgin.yaz
comparison libpurple/dnssrv.c @ 24698:d1da5c4c1e6b
Fix a crash in DNS SRV resolution when one of the required parameters is NULL.
Fixes #7765.
committer: John Bailey <rekkanoryo@rekkanoryo.org>
author | Florian Quèze <florian@instantbird.org> |
---|---|
date | Mon, 15 Dec 2008 04:02:28 +0000 |
parents | fae699fece1f |
children | 1d1d1829de11 a155920a6f66 |
comparison
equal
deleted
inserted
replaced
24697:08414e3d8b4f | 24698:d1da5c4c1e6b |
---|---|
334 #else | 334 #else |
335 GError* err = NULL; | 335 GError* err = NULL; |
336 static gboolean initialized = FALSE; | 336 static gboolean initialized = FALSE; |
337 #endif | 337 #endif |
338 | 338 |
339 if (!protocol || !*protocol || !transport || !*transport || !domain || !*domain) { | |
340 purple_debug_error("dnssrv", "Wrong arguments\n"); | |
341 cb(NULL, 0, extradata); | |
342 g_return_val_if_reached(NULL); | |
343 } | |
344 | |
339 query = g_strdup_printf("_%s._%s.%s", protocol, transport, domain); | 345 query = g_strdup_printf("_%s._%s.%s", protocol, transport, domain); |
340 purple_debug_info("dnssrv","querying SRV record for %s\n", query); | 346 purple_debug_info("dnssrv","querying SRV record for %s\n", query); |
341 | 347 |
342 #ifndef _WIN32 | 348 #ifndef _WIN32 |
343 if(pipe(in) || pipe(out)) { | 349 if(pipe(in) || pipe(out)) { |