--- a/libpurple/dnssrv.c Sun Sep 27 22:22:36 2009 +0000 +++ b/libpurple/dnssrv.c Sat Oct 03 16:29:05 2009 +0000 @@ -676,6 +676,7 @@ internal_query.type = T_SRV; strncpy(internal_query.query, query, 255); + internal_query.query[255] = '\0'; if (write(in[1], &internal_query, sizeof(internal_query)) < 0) purple_debug_error("dnssrv", "Could not write to SRV resolver\n");