From fb7294ed26d28b12d8da5cf5f41f5975f1999f04 Mon Sep 17 00:00:00 2001 From: ArvidNorr Date: Thu, 31 Jan 2013 20:17:42 +0100 Subject: [PATCH] small len fixes --- common/os_calls.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/os_calls.c b/common/os_calls.c index a3daaa3a..500db201 100644 --- a/common/os_calls.c +++ b/common/os_calls.c @@ -503,7 +503,7 @@ g_tcp_close(int sck) #if defined(_WIN32) closesocket(sck); #else - g_write_ip_address(sck,ip,256); + g_write_ip_address(sck,ip,255); log_message(LOG_LEVEL_INFO,"An established connection closed to endpoint: %s", ip); close(sck); #endif @@ -654,7 +654,7 @@ g_tcp_accept(int sck) ret = accept(sck, (struct sockaddr *)&s, &i); if(ret>0) { - snprintf(ipAddr,256,"A connection received from: %s port %d" + snprintf(ipAddr,255,"A connection received from: %s port %d" ,inet_ntoa(s.sin_addr),ntohs(s.sin_port)); log_message(LOG_LEVEL_INFO,ipAddr); }