aboutsummaryrefslogtreecommitdiffstats
path: root/package/iptables/patches
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2009-05-03 14:31:36 +0000
committerJo-Philipp Wich <jow@openwrt.org>2009-05-03 14:31:36 +0000
commit31a61b6b6bd6c37de7baba28b24aaabf148c00c8 (patch)
tree87fa4d7bff66884f666427510e6ec787275d5ceb /package/iptables/patches
parentce9be3158bf33b247589331e7063e98fca03c193 (diff)
downloadmaster-187ad058-31a61b6b6bd6c37de7baba28b24aaabf148c00c8.tar.gz
master-187ad058-31a61b6b6bd6c37de7baba28b24aaabf148c00c8.tar.bz2
master-187ad058-31a61b6b6bd6c37de7baba28b24aaabf148c00c8.zip
[package] iptables: fix segfault in xtables_parse_protocol() if an unknown protocol is specified for -p
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@15573 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/iptables/patches')
-rw-r--r--package/iptables/patches/1.4.3.2/010-xtables-parse-protocol-crash.patch13
1 files changed, 13 insertions, 0 deletions
diff --git a/package/iptables/patches/1.4.3.2/010-xtables-parse-protocol-crash.patch b/package/iptables/patches/1.4.3.2/010-xtables-parse-protocol-crash.patch
new file mode 100644
index 0000000000..e779aaa9cf
--- /dev/null
+++ b/package/iptables/patches/1.4.3.2/010-xtables-parse-protocol-crash.patch
@@ -0,0 +1,13 @@
+diff -ur iptables-1.4.3.2.orig/xtables.c iptables-1.4.3.2/xtables.c
+--- iptables-1.4.3.2.orig/xtables.c 2009-05-03 16:17:53.000000000 +0200
++++ iptables-1.4.3.2/xtables.c 2009-05-03 16:27:37.000000000 +0200
+@@ -1502,7 +1502,8 @@
+ else {
+ unsigned int i;
+ for (i = 0; i < ARRAY_SIZE(xtables_chain_protos); ++i) {
+- if (strcmp(s, xtables_chain_protos[i].name) == 0) {
++ if ((xtables_chain_protos[i].name != NULL) &&
++ (strcmp(s, xtables_chain_protos[i].name) == 0)) {
+ proto = xtables_chain_protos[i].num;
+ break;
+ }