aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristof Provost <kp@FreeBSD.org>2026-07-21 13:10:16 +0000
committerKristof Provost <kp@FreeBSD.org>2026-07-22 09:29:14 +0000
commit04f25ef716f74d6bb7941750091c6cb4b51d0b4d (patch)
tree2e3a9e5161c62b5d929e952516e5ce57a26c32f8
parent54e6dec44b6dd264b19e50439a58b33cab4c10c3 (diff)
-rw-r--r--contrib/pf/authpf/authpf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/pf/authpf/authpf.c b/contrib/pf/authpf/authpf.c
index 14d3d41b6e21..b835737c5ee2 100644
--- a/contrib/pf/authpf/authpf.c
+++ b/contrib/pf/authpf/authpf.c
@@ -404,8 +404,8 @@ read_config(FILE *f)
if (ap != &pair[2])
goto parse_error;
- tp = pair[1] + strlen(pair[1]);
- while ((*tp == ' ' || *tp == '\t') && tp >= pair[1])
+ tp = pair[1] + strlen(pair[1]) - 1;
+ while (tp >= pair[1] && (*tp == ' ' || *tp == '\t'))
*tp-- = '\0';
if (strcasecmp(pair[0], "anchor") == 0) {