Batch fix: security, bugs, quality, and features (v2) #198

Merged
TapTap merged 10 commits from integration/all-fixes-v2 into dev 2026-07-30 19:38:26 +02:00
2 changed files with 3 additions and 1 deletions
Showing only changes of commit 261683aaff - Show all commits
+1 -1
View File
@@ -189,7 +189,7 @@ bool file_save_to_disk(const char* root_directory, File* file, const Config* con
if (backup_path) {
char* backup_dir_path = str_dup(backup_path);
if (backup_dir_path) {
char* bdir = dirname(backup_dir_path);
const char* bdir = dirname(backup_dir_path);
mkdir_r(bdir);
free(backup_dir_path);
}
+2
View File
@@ -58,6 +58,8 @@ char* str_dup(const char* string) {
return NULL;
size_t str_len = strlen(string);
char* new_string = (char*)malloc(str_len + 1);
if (new_string == NULL)
return NULL;
memcpy(new_string, string, str_len + 1);
return new_string;
}