diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2009-05-03 14:31:36 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2009-05-03 14:31:36 +0000 |
commit | 1b890c945c3276ca6cad230fe7349a9a4b5f0c23 (patch) | |
tree | 3ed62c1217c889dbdca1ab693365136a4f4e99c9 /package/iptables/patches | |
parent | 8c7602a3f45b580b425e575a3c52e4503d85863d (diff) | |
download | upstream-1b890c945c3276ca6cad230fe7349a9a4b5f0c23.tar.gz upstream-1b890c945c3276ca6cad230fe7349a9a4b5f0c23.tar.bz2 upstream-1b890c945c3276ca6cad230fe7349a9a4b5f0c23.zip |
iptables: fix segfault in xtables_parse_protocol() if an unknown protocol is specified for -p
SVN-Revision: 15573
Diffstat (limited to 'package/iptables/patches')
-rw-r--r-- | package/iptables/patches/1.4.3.2/010-xtables-parse-protocol-crash.patch | 13 |
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; + } |