diff options
author | midipix <writeonce@midipix.org> | 2024-03-20 10:07:20 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2024-03-20 10:07:20 +0000 |
commit | c1ce862968a3470b3750c53c3e30c030abbd6dfe (patch) | |
tree | 85d47fff5f3a7d423ea9db8a3632f0b9a6d59bdf | |
parent | ec550d8a78930b4227993b72b539a0044d6609bf (diff) | |
download | slibtool-c1ce862968a3470b3750c53c3e30c030abbd6dfe.tar.bz2 slibtool-c1ce862968a3470b3750c53c3e30c030abbd6dfe.tar.xz |
slbt_exec_execute(): guard against corner-case long file names.
-rw-r--r-- | src/logic/slbt_exec_execute.c | 6 |
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 { |