From 822dca9c3f80adb07e01e68fca1597006b70d838 Mon Sep 17 00:00:00 2001 From: basil00 Date: Tue, 3 Jul 2018 09:37:14 +0800 Subject: [PATCH] Use snprintf() instead of sprintf_s(). The latter does not seem to work for MINGW. --- examples/streamdump/streamdump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/streamdump/streamdump.c b/examples/streamdump/streamdump.c index 3161693..c8c9164 100644 --- a/examples/streamdump/streamdump.c +++ b/examples/streamdump/streamdump.c @@ -186,7 +186,7 @@ int __cdecl main(int argc, char **argv) } // Divert all traffic to/from `port', `proxy_port' and `alt_port'. - r = sprintf_s(filter, sizeof(filter), + r = snprintf(filter, sizeof(filter), "tcp and " "(tcp.DstPort == %d or tcp.DstPort == %d or tcp.DstPort == %d or " "tcp.SrcPort == %d or tcp.SrcPort == %d or tcp.SrcPort == %d)",