summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordhill <dhill@openbsd.org>2012-01-15 15:59:33 +0000
committerdhill <dhill@openbsd.org>2012-01-15 15:59:33 +0000
commita592d7cf618fe8b51bbd21c4420a7a616943898c (patch)
tree8c859156e5572e8b1931380bc4de035efa8fc00e
parentAs SiS IDE has the same PCI product id for different revisions (diff)
downloadwireguard-openbsd-a592d7cf618fe8b51bbd21c4420a7a616943898c.tar.xz
wireguard-openbsd-a592d7cf618fe8b51bbd21c4420a7a616943898c.zip
convert an snprintf to strlcpy
ok mikeb henning
-rw-r--r--sbin/pfctl/pfctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c
index 4bf52a8cbcc..a674a53a655 100644
--- a/sbin/pfctl/pfctl.c
+++ b/sbin/pfctl/pfctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfctl.c,v 1.308 2011/12/03 12:46:16 mcbride Exp $ */
+/* $OpenBSD: pfctl.c,v 1.309 2012/01/15 15:59:33 dhill Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -772,7 +772,7 @@ pfctl_show_rules(int dev, char *path, int opts, enum pfctl_show format,
if (anchorname[0] == '/') {
if ((npath = calloc(1, MAXPATHLEN)) == NULL)
errx(1, "pfctl_rules: calloc");
- snprintf(npath, MAXPATHLEN, anchorname);
+ strlcpy(npath, anchorname, MAXPATHLEN);
} else {
if (path[0])
snprintf(&path[len], MAXPATHLEN - len, "/%s", anchorname);