aboutsummaryrefslogtreecommitdiff
path: root/src/lib/delivery/delivery_init.c
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2026-04-16 12:54:34 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2026-04-16 12:54:34 -0400
commitfdad37bc1854a973424459026cc32698ff5fe532 (patch)
tree7a4e7301d4ecb5c8ef4f5a81e6d20aed13638394 /src/lib/delivery/delivery_init.c
parentdc6b871b419159097c272fe21cdef6acece40a99 (diff)
downloadstasis-fdad37bc1854a973424459026cc32698ff5fe532.tar.gz
Convert more strcpy to strn variant
Diffstat (limited to 'src/lib/delivery/delivery_init.c')
-rw-r--r--src/lib/delivery/delivery_init.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/delivery/delivery_init.c b/src/lib/delivery/delivery_init.c
index 2f8b21a..ff877f0 100644
--- a/src/lib/delivery/delivery_init.c
+++ b/src/lib/delivery/delivery_init.c
@@ -174,13 +174,13 @@ int delivery_init_platform(struct Delivery *ctx) {
}
if (!strcmp(ctx->system.arch, "x86_64")) {
- strcpy(archsuffix, "64");
+ strncpy(archsuffix, "64", sizeof(archsuffix) - 1);
} else {
- strcpy(archsuffix, ctx->system.arch);
+ strncpy(archsuffix, ctx->system.arch, sizeof(archsuffix) - 1);
}
SYSDEBUG("%s", "Setting platform");
- strcpy(ctx->system.platform[DELIVERY_PLATFORM], uts.sysname);
+ strncpy(ctx->system.platform[DELIVERY_PLATFORM], uts.sysname, DELIVERY_PLATFORM_MAXLEN - 1);
if (!strcmp(ctx->system.platform[DELIVERY_PLATFORM], "Darwin")) {
snprintf(ctx->system.platform[DELIVERY_PLATFORM_CONDA_SUBDIR], DELIVERY_PLATFORM_MAXLEN, "osx-%s", archsuffix);
strncpy(ctx->system.platform[DELIVERY_PLATFORM_CONDA_INSTALLER], "MacOSX", DELIVERY_PLATFORM_MAXLEN - 1);