From 8972b74fd072286bf7ada214e96a50445b69abaf Mon Sep 17 00:00:00 2001 From: Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> Date: Tue, 1 Oct 2024 15:51:16 +0200 Subject: Fix builds on Windows (#2580) Quick fix with latest Windows image on GitHub CI, where we got: ``` ndpiReader.c:2860:38: error: '%s' directive output may be truncated writing up to 64 bytes into a region of size 63 [-Werror=format-truncation=] 2860 | snprintf(srcip, sizeof(srcip), "[%s]", flow->src_name); | ^~ ndpiReader.c:2860:5: note: 'snprintf' output between 3 and 67 bytes into a destination of size 64 2860 | snprintf(srcip, sizeof(srcip), "[%s]", flow->src_name); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ndpiReader.c:2861:38: error: '%s' directive output may be truncated writing up to 64 bytes into a region of size 63 [-Werror=format-truncation=] 2861 | snprintf(dstip, sizeof(dstip), "[%s]", flow->dst_name); | ^~ ndpiReader.c:2861:5: note: 'snprintf' output between 3 and 67 bytes into a destination of size 64 2861 | snprintf(dstip, sizeof(dstip), "[%s]", flow->dst_name); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` --- example/ndpiReader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'example') diff --git a/example/ndpiReader.c b/example/ndpiReader.c index fe8c4fe03..7325f71b3 100644 --- a/example/ndpiReader.c +++ b/example/ndpiReader.c @@ -2839,7 +2839,7 @@ static int is_realtime_protocol(ndpi_protocol proto) static void dump_realtime_protocol(struct ndpi_workflow * workflow, struct ndpi_flow_info *flow) { FILE *out = results_file ? results_file : stdout; - char srcip[64], dstip[64]; + char srcip[70], dstip[70]; char ip_proto[64], app_name[64]; char date[64]; int ret = is_realtime_protocol(flow->detected_protocol); -- cgit v1.2.3