summaryrefslogtreecommitdiffstats
path: root/extensions/libipt_psd.c
diff options
context:
space:
mode:
authorlaforge <laforge>2002-02-14 23:47:54 +0000
committerlaforge <laforge>2002-02-14 23:47:54 +0000
commitf13b347e88158f320b6d26c201954533f496564f (patch)
tree5783b8a6bea3e0c2aecc6b754443a2cd61050b56 /extensions/libipt_psd.c
parente7afca2d23700e435cd5f53222de9eb4e5185acb (diff)
fix for psd-delay-threshold > 100
Diffstat (limited to 'extensions/libipt_psd.c')
-rw-r--r--extensions/libipt_psd.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/extensions/libipt_psd.c b/extensions/libipt_psd.c
index 0b8b487..de1fc76 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 */