Author: ae
Date: Tue May  2 05:20:54 2017
New Revision: 317667
URL: https://svnweb.freebsd.org/changeset/base/317667

Log:
  In parse_range() validate both range values instead of checking
  the top  value twice.
  
  PR:           202295
  MFC after:    1 week

Modified:
  head/sbin/ipfw/dummynet.c

Modified: head/sbin/ipfw/dummynet.c
==============================================================================
--- head/sbin/ipfw/dummynet.c   Tue May  2 05:02:12 2017        (r317666)
+++ head/sbin/ipfw/dummynet.c   Tue May  2 05:20:54 2017        (r317667)
@@ -1881,7 +1881,7 @@ parse_range(int ac, char *av[], uint32_t
                        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 */
                }
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to