From 7176b321660fe70ca1fa6706cc184af8e4cb80ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stig=20Bj=C3=B8rlykke?= Date: Tue, 27 Feb 2018 23:15:16 +0100 Subject: addr: Include trailing '\0' in length from ipv6_to_str() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All other 'addr_to_str' functions does include the trailing '\0'. This is a bug introduced in g7507b11e. Change-Id: I6ac2be6d8aedf5c7fbea9dfe67b4d2b4c7f50a6f Reviewed-on: https://code.wireshark.org/review/26159 Petri-Dish: Stig Bjørlykke Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann --- epan/address_types.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'epan') diff --git a/epan/address_types.c b/epan/address_types.c index 70afc7991a..8b359c8564 100644 --- a/epan/address_types.c +++ b/epan/address_types.c @@ -235,7 +235,7 @@ static int ipv4_name_res_len(void) ******************************************************************************/ static int ipv6_to_str(const address* addr, gchar *buf, int buf_len) { - return ip6_to_str_buf((const ws_in6_addr *)addr->data, buf, buf_len); + return ip6_to_str_buf((const ws_in6_addr *)addr->data, buf, buf_len) + 1; } static int ipv6_str_len(const address* addr _U_) -- cgit v1.2.3