diff libpurple/network.c @ 26885:8290e36a5a73

A patch from Scott Wolchok to replace snprintf() with g_snprintf() and increase the size of some buffers to be able to fit -2^63. I don't think the snprintf() -> g_snprintf() changes do anything with glibc, but there's no harm in using the glib function to guarantee NUL termination. Fixes #8974
author Richard Laager <rlaager@wiktel.com>
date Sat, 16 May 2009 19:58:40 +0000
parents 5d1140b0b10a
children 38c4973b5222
line wrap: on
line diff
--- a/libpurple/network.c	Sat May 16 19:06:53 2009 +0000
+++ b/libpurple/network.c	Sat May 16 19:58:40 2009 +0000
@@ -303,7 +303,7 @@
 	/*
 	 * Get a list of addresses on this machine.
 	 */
-	snprintf(serv, sizeof(serv), "%hu", port);
+	g_snprintf(serv, sizeof(serv), "%hu", port);
 	memset(&hints, 0, sizeof(struct addrinfo));
 	hints.ai_flags = AI_PASSIVE;
 	hints.ai_family = AF_UNSPEC;