Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-4]: src/usr.sbin/tcpdump Pull up revision 1.8 (requested by he):



details:   https://anonhg.NetBSD.org/src/rev/9845be32d0ea
branches:  netbsd-1-4
changeset: 471199:9845be32d0ea
user:      he <he%NetBSD.org@localhost>
date:      Tue Oct 31 13:54:15 2000 +0000

description:
Pull up revision 1.8 (requested by he):
  Change from sprintf() to snprintf() where we may print externally
  supplied data of unknown length.

diffstat:

 usr.sbin/tcpdump/util.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 96f477211be0 -r 9845be32d0ea usr.sbin/tcpdump/util.c
--- a/usr.sbin/tcpdump/util.c   Tue Oct 31 13:53:50 2000 +0000
+++ b/usr.sbin/tcpdump/util.c   Tue Oct 31 13:54:15 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: util.c,v 1.6 1997/10/03 19:56:03 christos Exp $        */
+/*     $NetBSD: util.c,v 1.6.4.1 2000/10/31 13:54:15 he Exp $  */
 
 /*
  * Copyright (c) 1990, 1991, 1993, 1994, 1995, 1996, 1997
@@ -27,7 +27,7 @@
 static const char rcsid[] =
     "@(#) Header: util.c,v 1.58 97/05/09 14:52:17 leres Exp  (LBL)";
 #else
-__RCSID("$NetBSD: util.c,v 1.6 1997/10/03 19:56:03 christos Exp $");
+__RCSID("$NetBSD: util.c,v 1.6.4.1 2000/10/31 13:54:15 he Exp $");
 #endif
 #endif
 
@@ -161,7 +161,7 @@
        }
        if (fmt == NULL)
                fmt = "#%d";
-       (void)sprintf(buf, fmt, v);
+       (void)snprintf(buf, sizeof(buf), fmt, v);
        return (buf);
 }
 



Home | Main Index | Thread Index | Old Index