summaryrefslogtreecommitdiffstats
path: root/iptables
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2011-08-09 13:23:17 +0200
committerPatrick McHardy <kaber@trash.net>2011-08-09 13:23:17 +0200
commit91ca4603f649a9b9fed4f2e31a8c005cdbdacd1e (patch)
treeddab1727374ab926a68c8cc77cf88de6b64c190e /iptables
parent47b5855bc396876295c6432e553351123a62534b (diff)
parent4982fe43cf247cda6ddb946a8f1fd58177124735 (diff)
Merge branch 'master' of git://dev.medozas.de/iptables
Diffstat (limited to 'iptables')
-rw-r--r--iptables/xtables.c2
-rw-r--r--iptables/xtoptions.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/iptables/xtables.c b/iptables/xtables.c
index 1a5e568c..233efa30 100644
--- a/iptables/xtables.c
+++ b/iptables/xtables.c
@@ -37,6 +37,8 @@
# include <linux/magic.h> /* for PROC_SUPER_MAGIC */
#elif defined(HAVE_LINUX_PROC_FS_H)
# include <linux/proc_fs.h> /* Linux 2.4 */
+#else
+# define PROC_SUPER_MAGIC 0x9fa0
#endif
#include <xtables.h>
diff --git a/iptables/xtoptions.c b/iptables/xtoptions.c
index 1423724b..7095e3ea 100644
--- a/iptables/xtoptions.c
+++ b/iptables/xtoptions.c
@@ -757,13 +757,13 @@ static void xtopt_parse_ethermac(struct xt_option_call *cb)
for (i = 0; i < ARRAY_SIZE(cb->val.ethermac) - 1; ++i) {
cb->val.ethermac[i] = strtoul(arg, &end, 16);
- if (cb->val.ethermac[i] > UINT8_MAX || *end != ':')
+ if (*end != ':' || end - arg > 2)
goto out;
arg = end + 1;
}
i = ARRAY_SIZE(cb->val.ethermac) - 1;
cb->val.ethermac[i] = strtoul(arg, &end, 16);
- if (cb->val.ethermac[i] > UINT8_MAX || *end != '\0')
+ if (*end != '\0' || end - arg > 2)
goto out;
if (cb->entry->flags & XTOPT_PUT)
memcpy(XTOPT_MKPTR(cb), cb->val.ethermac,