aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndreas Steffen <andreas.steffen@strongswan.org>2007-04-19 14:26:11 +0000
committerAndreas Steffen <andreas.steffen@strongswan.org>2007-04-19 14:26:11 +0000
commit7ef4be2cb150a2c7ad5909260b6c8a3627e358c2 (patch)
treefbd60e4703c854c18558a86ea98bd59f2da4825b /src
parentb7ade11b16487a4d20065d7c68483ff3d54c6c2f (diff)
downloadstrongswan-7ef4be2cb150a2c7ad5909260b6c8a3627e358c2.tar.bz2
strongswan-7ef4be2cb150a2c7ad5909260b6c8a3627e358c2.tar.xz
unshare argument buffers
Diffstat (limited to 'src')
-rw-r--r--src/starter/invokecharon.c9
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)