fix: memory safety — malloc NULL checks, strcpy→memcpy, str_dup NULL check, remove unused include
CI / lint (pull_request) Failing after 2s
CI / build-and-test (pull_request) Has been skipped
CI / sanitizers (address) (pull_request) Has been skipped
CI / sanitizers (undefined) (pull_request) Has been skipped
CI / fuzz-build (pull_request) Has been skipped
CI / coverage (pull_request) Has been skipped
CI / valgrind (pull_request) Has been skipped

This commit is contained in:
2026-07-20 21:25:23 +02:00
parent 224e7e8599
commit 3ffc5c5236
6 changed files with 10 additions and 4 deletions
+1
View File
@@ -15,6 +15,7 @@ Config* config_create(char* version, char* send_directory, char* receive_directo
bool use_sendfile, unsigned long long chunk_size) {
Config* config = malloc(sizeof(Config));
if (config == NULL) return NULL;
config->version = version;
config->send_directory = send_directory;
config->receive_root_directory = receive_directory;