diff options
Diffstat (limited to 'src/lib/util/common_allocation.c')
-rw-r--r-- | src/lib/util/common_allocation.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/util/common_allocation.c b/src/lib/util/common_allocation.c index f610430da..8a2b4261d 100644 --- a/src/lib/util/common_allocation.c +++ b/src/lib/util/common_allocation.c | |||
@@ -326,9 +326,10 @@ GNUNET_asprintf (char **buf, | |||
326 | GNUNET_assert (ret >= 0); | 326 | GNUNET_assert (ret >= 0); |
327 | *buf = GNUNET_malloc (ret + 1); | 327 | *buf = GNUNET_malloc (ret + 1); |
328 | va_start (args, format); | 328 | va_start (args, format); |
329 | ret = vsprintf (*buf, | 329 | ret = vsnprintf (*buf, |
330 | format, | 330 | ret + 1, |
331 | args); | 331 | format, |
332 | args); | ||
332 | va_end (args); | 333 | va_end (args); |
333 | return ret; | 334 | return ret; |
334 | } | 335 | } |