From a772e18977ec215dbf39cfaa259d6f890f7bd5a0 Mon Sep 17 00:00:00 2001 From: Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> Date: Wed, 3 Feb 2021 11:56:37 +0100 Subject: Fix a warning (#1125) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Introduced in 5f7b9d802 reader_util.c: In function ‘process_ndpi_collected_info’: reader_util.c:1148:60: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 64 [-Wformat-truncation=] 1148 | sizeof(flow->ssh_tls.client_requested_server_name), "%s", | ^~ reader_util.c:1147:5: note: ‘snprintf’ output between 1 and 256 bytes into a destination of size 64 1147 | snprintf(flow->ssh_tls.client_requested_server_name, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1148 | sizeof(flow->ssh_tls.client_requested_server_name), "%s", | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1149 | flow->ndpi_flow->protos.tls_quic_stun.tls_quic.client_requested_server_name); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --- example/reader_util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'example') diff --git a/example/reader_util.h b/example/reader_util.h index ba05144dd..b7ab1bc41 100644 --- a/example/reader_util.h +++ b/example/reader_util.h @@ -204,7 +204,7 @@ typedef struct ndpi_flow_info { struct { u_int16_t ssl_version; - char client_requested_server_name[64], server_info[64], + char client_requested_server_name[256], server_info[64], client_hassh[33], server_hassh[33], *server_names, *tls_alpn, *tls_supported_versions, *tls_issuerDN, *tls_subjectDN, -- cgit v1.2.3