From af207f2160b2db75e6d2104a24cc4511210bbb7c Mon Sep 17 00:00:00 2001 From: Archie Cobbs Date: Mon, 13 Mar 2000 18:54:10 +0000 Subject: [PATCH] Use snprintf() instead of sprintf(). --- sys/netgraph/ng_tty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netgraph/ng_tty.c b/sys/netgraph/ng_tty.c index ca11e97e808..c96edaba7ec 100644 --- a/sys/netgraph/ng_tty.c +++ b/sys/netgraph/ng_tty.c @@ -229,7 +229,7 @@ ngt_open(dev_t dev, struct tty *tp) FREE(sc, M_NETGRAPH); goto done; } - sprintf(name, "%s%d", typestruct.name, ngt_unit++); + snprintf(name, sizeof(name), "%s%d", typestruct.name, ngt_unit++); /* Set back pointers */ sc->node->private = sc;