svn commit: r353084 - stable/11/contrib/ipfilter/tools

Cy Schubert cy at FreeBSD.org
Fri Oct 4 01:59:26 UTC 2019


Author: cy
Date: Fri Oct  4 01:59:25 2019
New Revision: 353084
URL: https://svnweb.freebsd.org/changeset/base/353084

Log:
  MFC r320095:
  
  Flag poolcommand() (ippool -A and ippool -R) command line syntax errors.

Modified:
  stable/11/contrib/ipfilter/tools/ippool.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/contrib/ipfilter/tools/ippool.c
==============================================================================
--- stable/11/contrib/ipfilter/tools/ippool.c	Fri Oct  4 01:58:13 2019	(r353083)
+++ stable/11/contrib/ipfilter/tools/ippool.c	Fri Oct  4 01:59:25 2019	(r353084)
@@ -291,7 +291,13 @@ poolcommand(remove, argc, argv)
 		case 'v' :
 			opts |= OPT_VERBOSE;
 			break;
+		default :
+			usage(argv[0]);
+			break;		/* keep compiler happy */
 		}
+
+	if (argc - 1 - optind > 0)
+		usage(argv[0]);
 
 	if (opts & OPT_DEBUG)
 		fprintf(stderr, "poolcommand: opts = %#x\n", opts);


More information about the svn-src-all mailing list