git: 90818083d795 - main - ipf: correct size limit in snprintf
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 20 Jul 2024 16:15:11 UTC
The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=90818083d795a9c06feca54f32fa6d35c200e1a2 commit 90818083d795a9c06feca54f32fa6d35c200e1a2 Author: Ryan Libby <rlibby@FreeBSD.org> AuthorDate: 2024-07-20 16:14:57 +0000 Commit: Ryan Libby <rlibby@FreeBSD.org> CommitDate: 2024-07-20 16:14:57 +0000 ipf: correct size limit in snprintf Reported by: GCC -Wsizeof-pointer-memaccess Reviewed by: zlei Differential Revision: https://reviews.freebsd.org/D45899 --- sbin/ipf/common/lexer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/ipf/common/lexer.c b/sbin/ipf/common/lexer.c index d1980765ef93..56ac3586af6e 100644 --- a/sbin/ipf/common/lexer.c +++ b/sbin/ipf/common/lexer.c @@ -449,7 +449,7 @@ buildipv6: oc = c; if (prior == YY_NUMBER && c == ':') { - snprintf(s, sizeof(s), "%d", priornum); + snprintf(s, sizeof(ipv6buf), "%d", priornum); s += strlen(s); }