[openssh-commits] [openssh] 01/02: upstream: be stricter in which characters will be accepted in
git+noreply at mindrot.org
git+noreply at mindrot.org
Mon May 2 09:22:51 AEST 2022
This is an automated email from the git hooks/post-receive script.
djm pushed a commit to branch master
in repository openssh.
commit a45615cb172bc827e21ec76750de39dfb30ecc05
Author: djm at openbsd.org <djm at openbsd.org>
Date: Fri Apr 29 04:55:07 2022 +0000
upstream: be stricter in which characters will be accepted in
specifying a mask length; allow only 0-9. From khaleesicodes via GHPR#278; ok
dtucker@
OpenBSD-Commit-ID: e267746c047ea86665cdeccef795a8a56082eeb2
---
addr.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/addr.c b/addr.c
index 1ad10ae0..abf3e3d9 100644
--- a/addr.c
+++ b/addr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: addr.c,v 1.4 2021/10/22 10:51:57 dtucker Exp $ */
+/* $OpenBSD: addr.c,v 1.5 2022/04/29 04:55:07 djm Exp $ */
/*
* Copyright (c) 2004-2008 Damien Miller <djm at mindrot.org>
@@ -397,7 +397,7 @@ addr_pton_cidr(const char *p, struct xaddr *n, u_int *l)
*mp = '\0';
mp++;
masklen = strtoul(mp, &cp, 10);
- if (*mp == '\0' || *cp != '\0' || masklen > 128)
+ if (*mp < '0' || *mp > '9' || *cp != '\0' || masklen > 128)
return -1;
}
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list