]> git.ipfire.org Git - thirdparty/fcron.git/commitdiff
Fixed fcrontab bug when asked to install a file with relative path.
authorThibault Godouet <yo8192@users.noreply.github.com>
Fri, 18 Apr 2025 20:07:25 +0000 (21:07 +0100)
committerThibault Godouet <yo8192@users.noreply.github.com>
Fri, 18 Apr 2025 20:08:15 +0000 (21:08 +0100)
fcrontab.c

index 75bc1eb89545b3cb3d7393f729594d8cbf768126..042584efce49e907f9adbc133e4f47c90f415351 100644 (file)
@@ -1114,7 +1114,7 @@ main(int argc, char **argv)
                 /* this is just the file name, not the path : complete it */
                 size_t path_len =
                     strlen(orig_dir) + 1 + strlen(argv[file_opt]) + 1;
-                alloc_safe(path_len, fcrontab_file_path);
+                fcrontab_file_path = alloc_safe(path_len, "fcrontab_file_path");
                 snprintf(fcrontab_file_path, path_len, "%s/%s", orig_dir,
                          argv[file_opt]);
             }