From 4e3432d68e81ffb2d43d1ca8f713e5a6f97d4789 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 30 Aug 2010 21:23:32 +0000 Subject: snprintf --- src/util/test_strings.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/util') diff --git a/src/util/test_strings.c b/src/util/test_strings.c index 5dc8e2887..fce40362c 100644 --- a/src/util/test_strings.c +++ b/src/util/test_strings.c @@ -65,13 +65,17 @@ check () (GNUNET_TIME_UNIT_MILLISECONDS, 7 * 60 * 60 * 1000)); WANT (buf, b); - sprintf (buf, "%s%s", getenv ( + GNUNET_snprintf (buf, + sizeof (buf), + "%s%s", + getenv ( #ifndef MINGW - "HOME" + "HOME" #else - "USERPROFILE" + "USERPROFILE" #endif -) , DIR_SEPARATOR_STR); + ), + DIR_SEPARATOR_STR); b = GNUNET_STRINGS_filename_expand ("~"); WANT (buf, b); GNUNET_STRINGS_buffer_fill (buf, sizeof (buf), 3, "a", "btx", "c"); -- cgit v1.2.3