From c1ce862968a3470b3750c53c3e30c030abbd6dfe Mon Sep 17 00:00:00 2001 From: midipix Date: Mar 20 2024 10:07:20 +0000 Subject: slbt_exec_execute(): guard against corner-case long file names. --- 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 {