From 4eb89ea4dcad4c01664b5331745f4e9a38facbd2 Mon Sep 17 00:00:00 2001 From: Alberto Compagno Date: Fri, 15 Nov 2019 08:58:23 +0000 Subject: [HICN-394] Add route commands add, list, del for the hicn-plugin Signed-off-by: Alberto Compagno Change-Id: I41641f6d27babaa1c413ecf2fe6eae0e499df97d --- lib/src/util/ip_address.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/src/util/ip_address.c b/lib/src/util/ip_address.c index 8bbb2bf5d..49818de40 100644 --- a/lib/src/util/ip_address.c +++ b/lib/src/util/ip_address.c @@ -142,12 +142,12 @@ ip_address_snprintf(char * s, size_t size, const ip_address_t * ip_address, int const char * rc; switch(family) { case AF_INET: - if (size <= INET_ADDRSTRLEN) + if (size < INET_ADDRSTRLEN) return -1; rc = inet_ntop (AF_INET, ip_address->v4.buffer, s, INET_ADDRSTRLEN); break; case AF_INET6: - if (size <= INET6_ADDRSTRLEN) + if (size < INET6_ADDRSTRLEN) return -1; rc = inet_ntop (AF_INET6, ip_address->v6.buffer, s, INET6_ADDRSTRLEN); break; -- cgit 1.2.3-korg