diff options
author | Jeremy <jeremy@sturgix.com> | 2015-12-01 13:00:58 -0500 |
---|---|---|
committer | Jeremy <jeremy@sturgix.com> | 2015-12-01 13:00:58 -0500 |
commit | b3639c8291098eeeefb166914bad98a53e506b90 (patch) | |
tree | e5c9b1ac0da3e1df33840991e84bb7df2309d2b2 /src/common/compat.c | |
parent | 86a5305d46175c5d0c67564d3ee4e86a27f0c460 (diff) | |
download | tor-b3639c8291098eeeefb166914bad98a53e506b90.tar.gz tor-b3639c8291098eeeefb166914bad98a53e506b90.zip |
src/common/compat.c:tor_vasprintf() - vsnprintf() was properly checked but tor_vsnprintf() available so why not use it?
Diffstat (limited to 'src/common/compat.c')
-rw-r--r-- | src/common/compat.c | 4 |
1 files changed, 3 insertions, 1 deletions
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); |