summaryrefslogtreecommitdiff
path: root/src/lib/libc/net/ns_ntoa.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libc/net/ns_ntoa.c')
-rw-r--r--src/lib/libc/net/ns_ntoa.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libc/net/ns_ntoa.c b/src/lib/libc/net/ns_ntoa.c
index 130ccd388b..3c82bc3cee 100644
--- a/src/lib/libc/net/ns_ntoa.c
+++ b/src/lib/libc/net/ns_ntoa.c
@@ -32,7 +32,7 @@
32 */ 32 */
33 33
34#if defined(LIBC_SCCS) && !defined(lint) 34#if defined(LIBC_SCCS) && !defined(lint)
35static char rcsid[] = "$OpenBSD: ns_ntoa.c,v 1.8 2002/02/16 21:27:23 millert Exp $"; 35static char rcsid[] = "$OpenBSD: ns_ntoa.c,v 1.9 2002/05/24 21:22:37 deraadt Exp $";
36#endif /* LIBC_SCCS and not lint */ 36#endif /* LIBC_SCCS and not lint */
37 37
38#include <sys/param.h> 38#include <sys/param.h>
@@ -54,7 +54,7 @@ ns_ntoa(addr)
54 u_char *uplim = up + 6; 54 u_char *uplim = up + 6;
55 55
56 net.net_e = addr.x_net; 56 net.net_e = addr.x_net;
57 sprintf(obuf, "%x", ntohl(net.long_e)); 57 snprintf(obuf, sizeof obuf, "%x", ntohl(net.long_e));
58 cp = spectHex(obuf); 58 cp = spectHex(obuf);
59 cp2 = cp + 1; 59 cp2 = cp + 1;
60 while (*up==0 && up < uplim) up++; 60 while (*up==0 && up < uplim) up++;