diff options
| author | Joseph Hunkeler <jhunkeler@gmail.com> | 2026-04-23 16:45:37 -0400 |
|---|---|---|
| committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2026-04-23 16:45:37 -0400 |
| commit | 8721fca71d83bad253428245f00f60bb74dde23e (patch) | |
| tree | cbd7698c7010e17523112d04f903bc74d9a15582 | |
| parent | 6321fc84ad313bd905d0f8f23d8e8c262d1c8123 (diff) | |
| download | stasis-8721fca71d83bad253428245f00f60bb74dde23e.tar.gz | |
conda_env_create_from_uri: increase size of filesystem path, and fix maxlenbughunt-1001
| -rw-r--r-- | src/lib/core/conda.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/core/conda.c b/src/lib/core/conda.c index 854d56d..4cb7710 100644 --- a/src/lib/core/conda.c +++ b/src/lib/core/conda.c @@ -561,11 +561,11 @@ int conda_env_create_from_uri(char *name, char *uri, char *python_version) { // Convert a bare system path to a file:// path if (!strstr(uri, "://")) { - uri_fs = calloc(strlen(uri) + strlen("file://") + 1, sizeof(*uri_fs)); + uri_fs = calloc(PATH_MAX, sizeof(*uri_fs)); if (!uri_fs) { return -1; } - snprintf(uri_fs, strlen(uri) + strlen("file://") + 1, "%s%s", "file://", uri); + snprintf(uri_fs, PATH_MAX, "%s%s", "file://", uri); } char tempfile[PATH_MAX] = {0}; |
