aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2011-04-14 11:26:25 +0200
committerTobias Brunner <tobias@strongswan.org>2011-04-14 18:10:27 +0200
commitcc2429d9a25417551ca49d143cb209f852a53db2 (patch)
tree8033550366afe8f2fff34cdb7c2efe59dbd942c1 /src
parentbac28c73ed4fa3298c163d23f2e3baa4e5513670 (diff)
downloadstrongswan-cc2429d9a25417551ca49d143cb209f852a53db2.tar.bz2
strongswan-cc2429d9a25417551ca49d143cb209f852a53db2.tar.xz
In scanf the maxmium length of %s does not include the null-terminator.
Diffstat (limited to 'src')
-rw-r--r--src/starter/invokecharon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/starter/invokecharon.c b/src/starter/invokecharon.c
index f8aa5e6a9..e88939415 100644
--- a/src/starter/invokecharon.c
+++ b/src/starter/invokecharon.c
@@ -147,7 +147,7 @@ int starter_start_charon (starter_config_t *cfg, bool no_fork, bool attach_gdb)
char *pos = cfg->setup.charondebug;
char *buf_pos = buffer;
- while (pos && sscanf(pos, "%4s %d,", type, &level) == 2)
+ while (pos && sscanf(pos, "%3s %d,", type, &level) == 2)
{
snprintf(buf_pos, buffer + sizeof(buffer) - buf_pos, "--debug-%s", type);
arg[argc++] = buf_pos;