diff options
Diffstat (limited to 'iptables')
-rw-r--r-- | iptables/xtables.c | 2 | ||||
-rw-r--r-- | iptables/xtoptions.c | 4 |
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, |