From 16804dc7794688fe232e7eaecc9cd15d950a0055 Mon Sep 17 00:00:00 2001 From: "Andrey V. Elsukov" Date: Tue, 2 May 2017 05:20:54 +0000 Subject: [PATCH] In parse_range() validate both range values instead of checking the top value twice. PR: 202295 MFC after: 1 week --- sbin/ipfw/dummynet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 */ }