Changes with Apache 1.3.20
+ *) Fix a possible NULL pointer dereference in the detection of the
+ default ServerName or IP string (introduced in 1.3.18).
+ [Ignasi Roca, <Ignasi.Roca@fujitsu-siemens.com>]
+
*) Make EBCDIC conversion fully configurable. Until now, apache relied
on some (incomplete) heuristics, and would fail to correctly serve
text files when they had a MIME type of application/anything, like
ap_log_error(APLOG_MARK, APLOG_WARNING, NULL,
"%s: gethostname() failed to determine ServerName\n",
ap_server_argv0);
- server_hostname = ap_pstrdup(a, "127.0.0.1");
}
else
{
if ((!(p = gethostbyname(str)))
|| (!(server_hostname = find_fqdn(a, p)))) {
/* Recovery - return the default servername by IP: */
- if (p->h_addr_list[0]) {
+ if (p && p->h_addr_list[0]) {
ap_snprintf(str, sizeof(str), "%pA", p->h_addr_list[0]);
server_hostname = ap_pstrdup(a, str);
/* We will drop through to report the IP-named server */