aboutsummaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorAndrey V. Elsukov <ae@FreeBSD.org>2017-05-02 05:20:54 +0000
committerAndrey V. Elsukov <ae@FreeBSD.org>2017-05-02 05:20:54 +0000
commit16804dc7794688fe232e7eaecc9cd15d950a0055 (patch)
treef47d859d9a56431da643cf175d6a6b8b7e58a03a /sbin
parente028ccdad82ec3dfdd10f17ccef10e568f9c3b2b (diff)
downloadsrc-16804dc7794688fe232e7eaecc9cd15d950a0055.tar.gz
src-16804dc7794688fe232e7eaecc9cd15d950a0055.zip
In parse_range() validate both range values instead of checking
the top value twice. PR: 202295 MFC after: 1 week
Notes
Notes: svn path=/head/; revision=317667
Diffstat (limited to 'sbin')
-rw-r--r--sbin/ipfw/dummynet.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/ipfw/dummynet.c b/sbin/ipfw/dummynet.c
index 20c563ba0ce4..e26171f4c53b 100644
--- a/sbin/ipfw/dummynet.c
+++ b/sbin/ipfw/dummynet.c
@@ -1881,7 +1881,7 @@ parse_range(int ac, char *av[], uint32_t *v, int len)
av--;
}
if (v[1] < v[0] ||
- v[1] >= DN_MAX_ID-1 ||
+ v[0] >= DN_MAX_ID-1 ||
v[1] >= DN_MAX_ID-1) {
continue; /* invalid entry */
}