From b3639c8291098eeeefb166914bad98a53e506b90 Mon Sep 17 00:00:00 2001 From: Jeremy Date: Tue, 1 Dec 2015 13:00:58 -0500 Subject: [PATCH] src/common/compat.c:tor_vasprintf() - vsnprintf() was properly checked but tor_vsnprintf() available so why not use it? --- src/common/compat.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/common/compat.c b/src/common/compat.c index 6f357530a6..e8b0897f59 100644 --- a/src/common/compat.c +++ b/src/common/compat.c @@ -573,7 +573,9 @@ tor_vasprintf(char **strp, const char *fmt, va_list args) int len, r; va_list tmp_args; va_copy(tmp_args, args); - len = vsnprintf(buf, sizeof(buf), fmt, tmp_args); + /* vsnprintf() was properly checked but tor_vsnprintf() available so + * why not use it? */ + len = tor_vsnprintf(buf, sizeof(buf), fmt, tmp_args); va_end(tmp_args); if (len < (int)sizeof(buf)) { *strp = tor_strdup(buf);