diff libpurple/savedstatuses.c @ 26967: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 5325d2185e88
children 32a707746454
line wrap: on
line diff
--- a/libpurple/savedstatuses.c	Sat May 16 19:06:53 2009 +0000
+++ b/libpurple/savedstatuses.c	Sat May 16 19:58:40 2009 +0000
@@ -285,13 +285,13 @@
 		xmlnode_set_attrib(node, "transient", "true");
 	}
 
-	snprintf(buf, sizeof(buf), "%lu", status->creation_time);
+	g_snprintf(buf, sizeof(buf), "%lu", status->creation_time);
 	xmlnode_set_attrib(node, "created", buf);
 
-	snprintf(buf, sizeof(buf), "%lu", status->lastused);
+	g_snprintf(buf, sizeof(buf), "%lu", status->lastused);
 	xmlnode_set_attrib(node, "lastused", buf);
 
-	snprintf(buf, sizeof(buf), "%u", status->usage_count);
+	g_snprintf(buf, sizeof(buf), "%u", status->usage_count);
 	xmlnode_set_attrib(node, "usage_count", buf);
 
 	child = xmlnode_new_child(node, "state");