From: Richard M. Stallman Date: Sun, 11 Feb 1996 19:26:25 +0000 (+0000) Subject: (Fopen_network_stream): Use sizeof, not strlen, for numeric_addr. X-Git-Tag: emacs-19.34~1316 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8777fbe2bb6a716ae9fce8702c0bf8c5fac34a9d;p=emacs.git (Fopen_network_stream): Use sizeof, not strlen, for numeric_addr. --- diff --git a/src/process.c b/src/process.c index 7fe324a6d1d..83188534796 100644 --- a/src/process.c +++ b/src/process.c @@ -1696,7 +1696,8 @@ Fourth arg SERVICE is name of the service desired, or an integer\n\ #endif host_info.h_addr = (char*)(&numeric_addr); addr_list[1] = 0; - host_info.h_length = strlen (addr_list[0]); + /* numeric_addr isn't null-terminated; it has fixed length. */ + host_info.h_length = sizeof (numeric_addr); } bzero (&address, sizeof address);