15 lines
560 B
Diff
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 */
|