diff options
author | Harald Welte <laforge@gnumonks.org> | 2002-02-14 23:47:54 +0000 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2002-02-14 23:47:54 +0000 |
commit | 63c364d6fd20b1f58df9e91bcb4cfea2ebae6507 (patch) | |
tree | 5783b8a6bea3e0c2aecc6b754443a2cd61050b56 | |
parent | 81d5d4f7658c8e406d2b7aaef480f33354eccc34 (diff) |
fix for psd-delay-threshold > 100
-rw-r--r-- | extensions/libipt_psd.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/extensions/libipt_psd.c b/extensions/libipt_psd.c index 0b8b4870..de1fc76c 100644 --- a/extensions/libipt_psd.c +++ b/extensions/libipt_psd.c @@ -82,12 +82,11 @@ parse(int c, char **argv, int invert, unsigned int *flags, { struct ipt_psd_info *psdinfo = (struct ipt_psd_info *)(*match)->data; unsigned int num; - char storage[sizeof(optarg) + 1]; + char storage[strlen(optarg) + 2]; - /* string_to_number needs this */ + /* string_to_number needs a leading space */ storage[0] = ' '; - strncpy(&storage[1], optarg, (size_t) sizeof(optarg)); - storage[sizeof(optarg)] = 0; + strcpy(&storage[1], optarg); switch (c) { /* PSD-weight-threshold */ |