[netfilter-cvslog] r6460 - trunk/iptables

laforge at netfilter.org laforge at netfilter.org
Thu Feb 9 15:35:39 CET 2006


Author: laforge at netfilter.org
Date: 2006-02-09 15:35:38 +0100 (Thu, 09 Feb 2006)
New Revision: 6460

Modified:
   trunk/iptables/ip6tables-restore.c
   trunk/iptables/iptables-restore.c
Log:
fix segfault or loading of invalid counters in ip[6]tables-restore (Olaf Rempel) (Closes: #437)


Modified: trunk/iptables/ip6tables-restore.c
===================================================================
--- trunk/iptables/ip6tables-restore.c	2006-02-09 00:51:31 UTC (rev 6459)
+++ trunk/iptables/ip6tables-restore.c	2006-02-09 14:35:38 UTC (rev 6460)
@@ -266,7 +266,10 @@
 					char *ctrs;
 					ctrs = strtok(NULL, " \t\n");
 
-					parse_counters(ctrs, &count);
+					if (!ctrs || !parse_counters(ctrs, &count))
+						exit_error(PARAMETER_PROBLEM,
+							  "invalid policy counters "
+							  "for chain '%s'\n", chain);
 
 				} else {
 					memset(&count, 0, 

Modified: trunk/iptables/iptables-restore.c
===================================================================
--- trunk/iptables/iptables-restore.c	2006-02-09 00:51:31 UTC (rev 6459)
+++ trunk/iptables/iptables-restore.c	2006-02-09 14:35:38 UTC (rev 6460)
@@ -269,7 +269,10 @@
 					char *ctrs;
 					ctrs = strtok(NULL, " \t\n");
 
-					parse_counters(ctrs, &count);
+					if (!ctrs || !parse_counters(ctrs, &count))
+						exit_error(PARAMETER_PROBLEM,
+							   "invalid policy counters "
+							   "for chain '%s'\n", chain);
 
 				} else {
 					memset(&count, 0, 




More information about the netfilter-cvslog mailing list