]> git.eshelyaron.com Git - emacs.git/commitdiff
(Fopen_network_stream): Use sizeof, not strlen, for numeric_addr.
authorRichard M. Stallman <rms@gnu.org>
Sun, 11 Feb 1996 19:26:25 +0000 (19:26 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sun, 11 Feb 1996 19:26:25 +0000 (19:26 +0000)
src/process.c

index 7fe324a6d1df8cfa18b6f325718cb817ea1920fa..831885347967c3424f5b10cfd0292d6511d57220 100644 (file)
@@ -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);