From c499612a7f1024a183d0200ef5f1ea7fba63a3e4 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Mon, 29 Jan 2018 15:48:55 -0800 Subject: Add nd_{v}snprintf() routines/wrappers. Some versions of the MSVC runtime library have a non-C99-compliant vsnprintf(), which we want to avoid. On Windows, use snprintf() and vsnprintf() for VS 2015 and later, where they both exist in C99-compliant forms, and wrap _{v}snprintf_s() otherwise (they're guaranteed to do the null termination that we want). --- print-telnet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'print-telnet.c') diff --git a/print-telnet.c b/print-telnet.c index f23d8a56..6c3e7d53 100644 --- a/print-telnet.c +++ b/print-telnet.c @@ -382,7 +382,7 @@ numstr(int x) { static char buf[20]; - snprintf(buf, sizeof(buf), "%#x", x); + nd_snprintf(buf, sizeof(buf), "%#x", x); return buf; } -- cgit v1.2.1