iptables/iptables-1.2.10-counters.patch
cvsdist 02a001b3b7 auto-import changelog data from iptables-1.2.10-1.src.rpm
Thu Jun 17 2004 Thomas Woerner <twoerner@redhat.com> 1.2.10-1
- new version 1.2.10
2004-09-09 06:26:03 +00:00

15 lines
560 B
Diff

--- iptables-1.2.10/iptables-restore.c.counters 2004-06-15 00:02:16.000000000 +0200
+++ iptables-1.2.10/iptables-restore.c 2004-06-17 14:01:50.953645355 +0200
@@ -73,7 +73,10 @@
int parse_counters(char *string, struct ipt_counters *ctr)
{
- return (sscanf(string, "[%llu:%llu]", (unsigned long long *)&ctr->pcnt, (unsigned long long *)&ctr->bcnt) == 2);
+ if (string != NULL)
+ return (sscanf(string, "[%llu:%llu]", (unsigned long long *)&ctr->pcnt, (unsigned long long *)&ctr->bcnt) == 2);
+ else
+ return (0 == 2);
}
/* global new argv and argc */