Mercurial > emacs
diff src/process.c @ 14544:ef07b51330af
(Fopen_network_stream): Use sizeof, not strlen, for numeric_addr.
| author | Richard M. Stallman <rms@gnu.org> |
|---|---|
| date | Sun, 11 Feb 1996 19:26:25 +0000 |
| parents | 912efc7b4d10 |
| children | 80196bfd8b94 |
line wrap: on
line diff
--- a/src/process.c Sun Feb 11 19:25:08 1996 +0000 +++ b/src/process.c Sun Feb 11 19:26:25 1996 +0000 @@ -1696,7 +1696,8 @@ #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);
