From: Christian Grothoff Date: Mon, 30 Aug 2010 21:23:32 +0000 (+0000) Subject: snprintf X-Git-Tag: initial-import-from-subversion-38251~20509 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4e3432d68e81ffb2d43d1ca8f713e5a6f97d4789;p=oweals%2Fgnunet.git snprintf --- 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");