Merge "Move some rules around"
diff --git a/tools/check_seapp.c b/tools/check_seapp.c
index a7de7a2..fe404b1 100644
--- a/tools/check_seapp.c
+++ b/tools/check_seapp.c
@@ -1128,6 +1128,9 @@
 			if (!token)
 				break;
 
+			if (token_cnt == KVP_NUM_OF_RULES)
+				goto oob;
+
 		} /*End token parsing */
 
 		rule_map *r = rule_map_new(keys, token_cnt, lineno, in_file->name, is_never_allow);
@@ -1148,6 +1151,10 @@
 oom:
 	log_error("In function %s:  Out of memory\n", __FUNCTION__);
 	exit(EXIT_FAILURE);
+oob:
+	log_error("Reading file: \"%s\" line: %zu reason: the size of key pairs exceeds the MAX(%zu)\n",
+		in_file->name, lineno, KVP_NUM_OF_RULES);
+	exit(EXIT_FAILURE);
 }
 
 /**