summaryrefslogtreecommitdiff
path: root/sbin/pfctl/pfctl.c
diff options
context:
space:
mode:
authorDavid Hill <dhill@cvs.openbsd.org>2012-01-15 15:59:34 +0000
committerDavid Hill <dhill@cvs.openbsd.org>2012-01-15 15:59:34 +0000
commit6df85ff72e3e569b65f6f57eb849d44e7381b972 (patch)
tree40bf061c8e077e95835250577c390583f83d51ef /sbin/pfctl/pfctl.c
parenta58584d8ba7bcdaf7d8ee61e4bb95e3d93751701 (diff)
convert an snprintf to strlcpy
ok mikeb henning
Diffstat (limited to 'sbin/pfctl/pfctl.c')
-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);