diff options
author | Harald Welte <laforge@gnumonks.org> | 2002-08-03 13:04:57 +0000 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2002-08-03 13:04:57 +0000 |
commit | 6e85beb63aa4bd2e7a6c2b6e4e58ca92f3156ba5 (patch) | |
tree | a04b380abf4871a4a38be1713847d3a11561612e /extensions/libipt_MARK.c | |
parent | 2bd0adab26a3f9dcdfe1839d503853597d0131d7 (diff) |
make MARK target use string_to_number [and thus report range overflows].
Diffstat (limited to 'extensions/libipt_MARK.c')
-rw-r--r-- | extensions/libipt_MARK.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/extensions/libipt_MARK.c b/extensions/libipt_MARK.c index 93570d67..9774d459 100644 --- a/extensions/libipt_MARK.c +++ b/extensions/libipt_MARK.c @@ -48,8 +48,7 @@ parse(int c, char **argv, int invert, unsigned int *flags, switch (c) { char *end; case '1': - markinfo->mark = strtoul(optarg, &end, 0); - if (*end != '\0' || end == optarg) + if (string_to_number(optarg, 0, 0xfffff, &markinfo->mark)) exit_error(PARAMETER_PROBLEM, "Bad MARK value `%s'", optarg); if (*flags) exit_error(PARAMETER_PROBLEM, |