Index: trunk/docs/Changelog
===================================================================
--- trunk/docs/Changelog	(revision 583)
+++ trunk/docs/Changelog	(revision 584)
@@ -1,3 +1,4 @@
 4.5.2
+	* fix segfault with --enable-static on unresolvable host name
 	* fix autoreconf (problem reported by Pascal de Bruijn)
 	* add missing items to distclean Makefile target (problem
Index: trunk/src/sh_ipvx.c
===================================================================
--- trunk/src/sh_ipvx.c	(revision 583)
+++ trunk/src/sh_ipvx.c	(revision 584)
@@ -316,5 +316,5 @@
     return host_entry->h_name;
   } else {
-    for (p = host_entry->h_aliases; *p; ++p) {
+    for (p = host_entry->h_aliases; (p && *p); ++p) {
       if (strchr(*p, '.'))
 	return *p;
Index: trunk/src/sh_static.c
===================================================================
--- trunk/src/sh_static.c	(revision 583)
+++ trunk/src/sh_static.c	(revision 584)
@@ -1843,5 +1843,5 @@
 struct hostent * sh_gethostbyname(const char *name)
 {
-	static struct hostent h;
+        static struct hostent h = { NULL, NULL, 0, 0, NULL};
 	static char buf[sizeof(struct in_addr) +
 			sizeof(struct in_addr *)*2 +
