The branch main has been updated by kp:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=b3902af408a98ff5520d50e6af69652d9b2984d5

commit b3902af408a98ff5520d50e6af69652d9b2984d5
Author:     Kristof Provost <k...@freebsd.org>
AuthorDate: 2025-07-07 08:49:20 +0000
Commit:     Kristof Provost <k...@freebsd.org>
CommitDate: 2025-07-07 15:06:52 +0000

    pfctl: use str*l*cpy() to copy strings
    
    Ensure it's always '\0'-terminated.
    
    Reported by:    ivy@
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
---
 sbin/pfctl/pfctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c
index 738c89069383..defba3b56c44 100644
--- a/sbin/pfctl/pfctl.c
+++ b/sbin/pfctl/pfctl.c
@@ -1632,7 +1632,7 @@ pfctl_show_states(int dev, const char *iface, int opts)
        struct pfctl_state_filter filter = {};
 
        if (iface != NULL)
-               strncpy(filter.ifname, iface, IFNAMSIZ);
+               strlcpy(filter.ifname, iface, IFNAMSIZ);
 
        arg.opts = opts;
        arg.dotitle = opts & PF_OPT_SHOWALL;

Reply via email to