From 932877e6bd757d88781b1959803c51d8557cc0b6 Mon Sep 17 00:00:00 2001 From: Thomas Woerner Date: Fri, 18 Mar 2005 16:45:13 +0000 Subject: [PATCH] [tw] forgot to add one patch --- iptables-1.3.0-cleanup.patch | 54 ++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 iptables-1.3.0-cleanup.patch diff --git a/iptables-1.3.0-cleanup.patch b/iptables-1.3.0-cleanup.patch new file mode 100644 index 0000000..e907b30 --- /dev/null +++ b/iptables-1.3.0-cleanup.patch @@ -0,0 +1,54 @@ +--- iptables-1.3.0/extensions/libipt_rpc.c.cleanup 2005-03-18 16:25:34.174370567 +0100 ++++ iptables-1.3.0/extensions/libipt_rpc.c 2005-03-18 16:25:32.000000000 +0100 +@@ -252,7 +252,7 @@ + + idup = 0; + memset(buf, 0, sizeof(buf)); +- dst = (char *)buf - 1; ++ dst = (char *)buf; + } + } + +--- iptables-1.3.0/extensions/libipt_REJECT.c.cleanup 2005-03-18 16:29:21.611549462 +0100 ++++ iptables-1.3.0/extensions/libipt_REJECT.c 2005-03-18 16:31:26.951045260 +0100 +@@ -147,13 +147,16 @@ + { + const struct ipt_reject_info *reject + = (const struct ipt_reject_info *)target->data; +- unsigned int i; ++ unsigned int i, limit=sizeof(reject_table)/sizeof(struct reject_names); + +- for (i = 0; i < sizeof(reject_table)/sizeof(struct reject_names); i++) { ++ for (i = 0; i < limit; i++) { + if (reject_table[i].with == reject->with) + break; + } +- printf("reject-with %s ", reject_table[i].name); ++ if (i < limit) ++ printf("reject-with %s ", reject_table[i].name); ++ else ++ fprintf(stderr, "reject-with: error reject->with not found "); + } + + /* Saves ipt_reject in parsable form to stdout. */ +@@ -161,13 +164,16 @@ + { + const struct ipt_reject_info *reject + = (const struct ipt_reject_info *)target->data; +- unsigned int i; ++ unsigned int i, limit=sizeof(reject_table)/sizeof(struct reject_names); + +- for (i = 0; i < sizeof(reject_table)/sizeof(struct reject_names); i++) ++ for (i = 0; i < limit; i++) { + if (reject_table[i].with == reject->with) + break; +- +- printf("--reject-with %s ", reject_table[i].name); ++ } ++ if (i < limit) ++ printf("--reject-with %s ", reject_table[i].name); ++ else ++ fprintf(stderr, "--reject-with error reject->with not found"); + } + + static struct iptables_target reject = {