[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OPENBSD_2_9 (SEMMNI, SEMMNS, SHMMAXPGS): httpd Memory fault(core dumped)



Heikki Korpela wrote:
> On Wed, 4 Jul 2001, Alexander Farber (EED) wrote:
>
> #0  0x658c6 in ap_get_local_host (a=0xab00c) at util.c:2051
> 2051                if (p->h_addr_list[0]) {
> (gdb) bt
> #0  0x658c6 in ap_get_local_host (a=0xab00c) at util.c:2051
> #1  0x610a1 in ap_fini_vhost_config (p=0xab00c, main_s=0xab034) at http_vhost.c:548
> #2  0x45a11 in ap_read_config (p=0xab00c, ptemp=0xb100c, 
>     confname=0x9f99c "conf/httpd.conf") at http_config.c:1653
> #3  0x557a2 in main (argc=1, argv=0xdfbfd830) at http_main.c:5088

In the file /usr/src/usr.sbin/httpd/src/main/util.c line 2048:
the p = gethostbyname(str) returns according to the man page:

     h_addr_list  A zero-terminated array of network addresses for the host.

                  Host addresses are returned in network byte order.

Maybe a check for (NULL != p -> h_addr_list) should 
be done before accessing the p->h_addr_list[0] ?

Regards
Alex