mirror of
git://anongit.mindrot.org/openssh.git
synced 2025-02-16 13:56:52 +00:00
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
This commit is contained in:
parent
4835544d2d
commit
a45615cb17
4
addr.c
4
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@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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user