Changeset 584


Ignore:
Timestamp:
Jan 2, 2025, 10:13:23 AM (8 days ago)
Author:
katerina
Message:

Fix for ticket #472 (segfault on startup with static binary and no fqdn)

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/docs/Changelog

    r583 r584  
    114.5.2
     2        * fix segfault with --enable-static on unresolvable host name
    23        * fix autoreconf (problem reported by Pascal de Bruijn)
    34        * add missing items to distclean Makefile target (problem
  • trunk/src/sh_ipvx.c

    r560 r584  
    316316    return host_entry->h_name;
    317317  } else {
    318     for (p = host_entry->h_aliases; *p; ++p) {
     318    for (p = host_entry->h_aliases; (p && *p); ++p) {
    319319      if (strchr(*p, '.'))
    320320        return *p;
  • trunk/src/sh_static.c

    r570 r584  
    18431843struct hostent * sh_gethostbyname(const char *name)
    18441844{
    1845         static struct hostent h;
     1845        static struct hostent h = { NULL, NULL, 0, 0, NULL};
    18461846        static char buf[sizeof(struct in_addr) +
    18471847                        sizeof(struct in_addr *)*2 +
Note: See TracChangeset for help on using the changeset viewer.