Changeset 584 for trunk/src


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/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • 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.