From 2ad6ff4601683278154901b9f31bc4b6ae136b6c Mon Sep 17 00:00:00 2001 From: Jakob Schlyter Date: Thu, 23 Nov 2000 18:32:21 +0000 Subject: fix one more s/sprintf/snprintf/; jeremy@hack.org.il --- usr.sbin/tcpdump/addrtoname.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.sbin/tcpdump/addrtoname.c b/usr.sbin/tcpdump/addrtoname.c index 6b693013400..705de9a6176 100644 --- a/usr.sbin/tcpdump/addrtoname.c +++ b/usr.sbin/tcpdump/addrtoname.c @@ -1,4 +1,4 @@ -/* $OpenBSD: addrtoname.c,v 1.16 2000/10/31 16:06:46 deraadt Exp $ */ +/* $OpenBSD: addrtoname.c,v 1.17 2000/11/23 18:32:20 jakob Exp $ */ /* * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 @@ -25,7 +25,7 @@ */ #ifndef lint static const char rcsid[] = - "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/addrtoname.c,v 1.16 2000/10/31 16:06:46 deraadt Exp $ (LBL)"; + "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/addrtoname.c,v 1.17 2000/11/23 18:32:20 jakob Exp $ (LBL)"; #endif #include @@ -673,7 +673,7 @@ udpport_string(register u_short port) tp->addr = i; tp->nxt = newhnamemem(); - (void)sprintf(buf, "%u", i); + (void)snprintf(buf, sizeof(buf), "%u", i); tp->name = savestr(buf); return (tp->name); } -- cgit v1.2.3