In parse_range() validate both range values instead of checking

the top  value twice.

PR:		202295
MFC after:	1 week
This commit is contained in:
Andrey V. Elsukov 2017-05-02 05:20:54 +00:00
parent e028ccdad8
commit 16804dc779

View File

@ -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 */
}