Index: trunk/docs/Changelog
===================================================================
--- trunk/docs/Changelog	(revision 351)
+++ trunk/docs/Changelog	(revision 352)
@@ -1,2 +1,5 @@
+2.8.6:
+	* Fix uninitialized string in error message (reported by mimox)
+
 2.8.5a:
 	* Fix autolocal.m4 for new configure option
Index: trunk/src/sh_error.c
===================================================================
--- trunk/src/sh_error.c	(revision 351)
+++ trunk/src/sh_error.c	(revision 352)
@@ -27,4 +27,5 @@
 #if !defined(__sun__) && !defined(__sun)
 #define _XOPEN_SOURCE 600
+#undef  _GNU_SOURCE
 #endif
 #include <string.h>
@@ -351,4 +352,5 @@
 
 #if defined(HAVE_STRERROR_R)
+  if (len > 0) str[0] = '\0';
   strerror_r(tellme, str, len);
   return str;
Index: trunk/src/sh_tools.c
===================================================================
--- trunk/src/sh_tools.c	(revision 351)
+++ trunk/src/sh_tools.c	(revision 352)
@@ -564,4 +564,6 @@
   SL_ENTER(_("connect_port"));
 
+  if (errsiz > 0) errmsg[0] = '\0';
+
   /* paranoia -- should not happen
    */
