Index: trunk/include/sh_utils.h
===================================================================
--- trunk/include/sh_utils.h	(revision 551)
+++ trunk/include/sh_utils.h	(revision 552)
@@ -179,7 +179,7 @@
 /* returns freshly allocated memory, return value should be free'd
  */
-char * sh_util_safe_name (const char * name) SH_GNUC_MALLOC SH_GNUC_PURE;
-
-char * sh_util_safe_name_keepspace (const char * name) SH_GNUC_MALLOC SH_GNUC_PURE;
+char * sh_util_safe_name (const char * name) SH_GNUC_MALLOC;
+
+char * sh_util_safe_name_keepspace (const char * name) SH_GNUC_MALLOC;
 
 /* check max size of printf result string
Index: trunk/src/sh_static.c
===================================================================
--- trunk/src/sh_static.c	(revision 551)
+++ trunk/src/sh_static.c	(revision 552)
@@ -1765,5 +1765,5 @@
 	if (buflen<256)
 		return ERANGE;
-	strncpy(buf, name, buflen);
+	strncpy(buf, name, buflen-1);
 
 	/* First check if this is already an address */
@@ -1792,5 +1792,5 @@
 		}
 
-		strncpy(buf, a.dotted, buflen);
+		strncpy(buf, a.dotted, buflen-1);
 		free(a.dotted);
 
@@ -2013,5 +2013,5 @@
 		}
 
-		strncpy(buf, a.dotted, buflen);
+		strncpy(buf, a.dotted, buflen-1);
 		free(a.dotted);
 
Index: trunk/src/slib.c
===================================================================
--- trunk/src/slib.c	(revision 551)
+++ trunk/src/slib.c	(revision 552)
@@ -257,7 +257,7 @@
     {
       sl_snprintf    (val, 81, _("\n---------  %10s "), file);
-      sl_strlcpy     (msg,    val,   80);
+      sl_strlcpy     (msg,    val,   sizeof(msg));
       sl_snprintf    (val, 81, _(" --- %6d ---------\n"), line);
-      sl_strlcat     (msg,     val,   80);
+      sl_strlcat     (msg,     val,   sizeof(msg));
       sh_log_console (msg);
     }
