summaryrefslogtreecommitdiff
path: root/src/logic/slbt_exec_ctx.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/logic/slbt_exec_ctx.c')
-rw-r--r--src/logic/slbt_exec_ctx.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/logic/slbt_exec_ctx.c b/src/logic/slbt_exec_ctx.c
index 40872a0..afd130c 100644
--- a/src/logic/slbt_exec_ctx.c
+++ b/src/logic/slbt_exec_ctx.c
@@ -65,9 +65,10 @@ static struct slbt_exec_ctx_impl * slbt_exec_ctx_alloc(
argc = 0;
csrc = 0;
- /* clerical buffer size (guard, suffix, version) */
- size = strlen(".lo") + strlen(".libs/") + 2*sizeof('\0');
- size += 36*strlen(".0000") + 36*sizeof('\0');
+ /* clerical [worst-case] buffer size (guard, .libs, version) */
+ size = strlen(".lo") + sizeof('\0');
+ size += 6 * (strlen(".libs/") + sizeof('\0'));
+ size += 36 * (strlen(".0000") + sizeof('\0'));
/* buffer size (cargv, -Wc) */
for (parg=dctx->cctx->cargv; *parg; parg++, argc++)