From c21360db73c9bf14e80f7f2f80f798674f89f891 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 22 Apr 2026 13:14:25 -0400 Subject: artifactory_download_cli: Add more SYSDEBUG statements --- src/lib/core/artifactory.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/lib/core/artifactory.c b/src/lib/core/artifactory.c index d452248..f70c0b8 100644 --- a/src/lib/core/artifactory.c +++ b/src/lib/core/artifactory.c @@ -78,7 +78,13 @@ int artifactory_download_cli(char *dest, SYSDEBUG("%s", "Construct path to write data"); const char *remote_filename_fmt = "/%s"; int remote_filename_fmt_len = snprintf(NULL, 0, remote_filename_fmt, remote_filename); - snprintf(path + strlen(path), sizeof(path) - remote_filename_fmt_len, remote_filename_fmt, remote_filename); + SYSDEBUG("path buffer contents: '%s'", path); + SYSDEBUG("path buffer size: %zu", sizeof(path)); + SYSDEBUG("path strlen: %zu", strlen(path)); + SYSDEBUG("remote_filename_fmt_len: %d", remote_filename_fmt_len); + SYSDEBUG("maxlen for snprintf: %zu", sizeof(path) - strlen(path) - remote_filename_fmt_len); + + snprintf(path + strlen(path), sizeof(path) - strlen(path) - remote_filename_fmt_len, remote_filename_fmt, remote_filename); char *errmsg = NULL; SYSDEBUG("%s", "Downloading..."); long fetch_status = download(url, path, &errmsg); -- cgit