changeset 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 77a1345ec9ca
children bd43252760b4
files src/process.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
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);