aboutsummaryrefslogtreecommitdiff
path: root/src/lib/delivery/delivery_install.c
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2026-04-16 11:52:11 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2026-04-16 11:52:11 -0400
commitdc6b871b419159097c272fe21cdef6acece40a99 (patch)
tree1d2e4ef745106cb4a7a804698b45739a163cbe38 /src/lib/delivery/delivery_install.c
parentf40adf8259a9f034b6fff7abff047e9a746f7ec1 (diff)
downloadstasis-dc6b871b419159097c272fe21cdef6acece40a99.tar.gz
Convert more strcat and strcpy to strn variants
Diffstat (limited to 'src/lib/delivery/delivery_install.c')
-rw-r--r--src/lib/delivery/delivery_install.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/delivery/delivery_install.c b/src/lib/delivery/delivery_install.c
index fe3bc66..4970749 100644
--- a/src/lib/delivery/delivery_install.c
+++ b/src/lib/delivery/delivery_install.c
@@ -203,7 +203,7 @@ int delivery_install_packages(struct Delivery *ctx, char *conda_install_dir, cha
}
memset(command_base, 0, sizeof(command_base));
- strcat(command_base, "install");
+ strncat(command_base, "install", sizeof(command_base) - strlen(command_base) - 1);
typedef int (*Runner)(const char *);
Runner runner = NULL;
@@ -214,13 +214,13 @@ int delivery_install_packages(struct Delivery *ctx, char *conda_install_dir, cha
}
if (INSTALL_PKG_CONDA_DEFERRED & type) {
- strcat(command_base, " --use-local");
+ strncat(command_base, " --use-local", sizeof(command_base) - strlen(command_base) - 1);
} else if (INSTALL_PKG_PIP_DEFERRED & type) {
// Don't change the baseline package set unless we're working with a
// new build. Release candidates will need to keep packages as stable
// as possible between releases.
if (!ctx->meta.based_on) {
- strcat(command_base, " --upgrade");
+ strncat(command_base, " --upgrade", sizeof(command_base) - strlen(command_base) - 1);
}
const char *command_base_fmt = " --extra-index-url 'file://%s'";
const int len = snprintf(NULL, 0, command_base_fmt, ctx->storage.wheel_artifact_dir);