summaryrefslogtreecommitdiffhomepage
path: root/src/logic
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-03-20 10:07:20 +0000
committermidipix <writeonce@midipix.org>2024-03-20 10:07:20 +0000
commitc1ce862968a3470b3750c53c3e30c030abbd6dfe (patch)
tree85d47fff5f3a7d423ea9db8a3632f0b9a6d59bdf /src/logic
parentec550d8a78930b4227993b72b539a0044d6609bf (diff)
downloadslibtool-c1ce862968a3470b3750c53c3e30c030abbd6dfe.tar.bz2
slibtool-c1ce862968a3470b3750c53c3e30c030abbd6dfe.tar.xz
slbt_exec_execute(): guard against corner-case long file names.
Diffstat (limited to 'src/logic')
-rw-r--r--src/logic/slbt_exec_execute.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/logic/slbt_exec_execute.c b/src/logic/slbt_exec_execute.c
index a43013b..7f9389b 100644
--- a/src/logic/slbt_exec_execute.c
+++ b/src/logic/slbt_exec_execute.c
@@ -154,7 +154,11 @@ int slbt_exec_execute(const struct slbt_driver_ctx * dctx)
return SLBT_NESTED_ERROR(dctx);
} else if (ret == 1) {
- sprintf(wrapper,"%s.exe.wrapper",exeprog);
+ if (slbt_snprintf(
+ wrapper,sizeof(wrapper),
+ "%s.exe.wrapper",exeprog) < 0)
+ return SLBT_BUFFER_ERROR(dctx);
+
exeref = *parg;
*aarg++ = wrapper;
} else {