diff options
author | Andreas Steffen <andreas.steffen@strongswan.org> | 2007-04-19 14:26:11 +0000 |
---|---|---|
committer | Andreas Steffen <andreas.steffen@strongswan.org> | 2007-04-19 14:26:11 +0000 |
commit | 7ef4be2cb150a2c7ad5909260b6c8a3627e358c2 (patch) | |
tree | fbd60e4703c854c18558a86ea98bd59f2da4825b /src/starter/invokecharon.c | |
parent | b7ade11b16487a4d20065d7c68483ff3d54c6c2f (diff) | |
download | strongswan-7ef4be2cb150a2c7ad5909260b6c8a3627e358c2.tar.bz2 strongswan-7ef4be2cb150a2c7ad5909260b6c8a3627e358c2.tar.xz |
unshare argument buffers
Diffstat (limited to 'src/starter/invokecharon.c')
-rw-r--r-- | src/starter/invokecharon.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/starter/invokecharon.c b/src/starter/invokecharon.c index e97c8388b..94d046d35 100644 --- a/src/starter/invokecharon.c +++ b/src/starter/invokecharon.c @@ -100,6 +100,7 @@ starter_start_charon (starter_config_t *cfg, bool debug) { int pid, i; struct stat stb; + char buffer[BUF_LEN], buffer1[BUF_LEN]; int argc = 1; char *arg[] = { CHARON_CMD, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, @@ -122,11 +123,9 @@ starter_start_charon (starter_config_t *cfg, bool debug) } if (cfg->setup.crlcheckinterval > 0) { - char buffer[BUF_LEN]; - - snprintf(buffer, BUF_LEN, "%u", cfg->setup.crlcheckinterval); + snprintf(buffer1, BUF_LEN, "%u", cfg->setup.crlcheckinterval); arg[argc++] = "--crlcheckinterval"; - arg[argc++] = buffer; + arg[argc++] = buffer1; } if (cfg->setup.eapdir) { @@ -135,7 +134,7 @@ starter_start_charon (starter_config_t *cfg, bool debug) } { /* parse debug string */ - char *pos, *level, *buf_pos, type[4], buffer[BUF_LEN]; + char *pos, *level, *buf_pos, type[4]; pos = cfg->setup.charondebug; buf_pos = buffer; while (pos && sscanf(pos, "%4s %d,", type, &level) == 2) |