+2006-04-12 Richard Stallman <rms@gnu.org>
+
+ * process.c (conv_lisp_to_sockaddr): If FAMILY unknown, just return.
+ (Fprocess_send_eof): Abort if fail to open null device.
+
2006-04-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
* fns.c [HAVE_MENUS && MAC_OS]: Include macterm.h.
}
/* Convert an address object (vector or string) to an internal sockaddr.
- Address format has already been validated by get_lisp_to_sockaddr_size,
- but just to be nice, we return without doing anything
- if FAMILY is not valid. */
+
+ The address format has been basically validated by
+ get_lisp_to_sockaddr_size, but this does not mean FAMILY is valid;
+ it could have come from user data. So if FAMILY is not valid,
+ we return after zeroing *SA. */
static void
conv_lisp_to_sockaddr (family, address, sa, len)
register int i;
bzero (sa, len);
- sa->sa_family = family;
if (VECTORP (address))
{
i = XINT (p->contents[--len]);
sin->sin_port = htons (i);
cp = (unsigned char *)&sin->sin_addr;
+ sa->sa_family = family;
}
#ifdef AF_INET6
else if (family == AF_INET6)
int j = XFASTINT (p->contents[i]) & 0xffff;
ip6[i] = ntohs (j);
}
- return;
+ sa->sa_family = family;
}
#endif
return;
cp = SDATA (address);
for (i = 0; i < sizeof (sockun->sun_path) && *cp; i++)
sockun->sun_path[i] = *cp++;
+ sa->sa_family = family;
}
#endif
return;