merge: resolve dev (quality refactor) into security-fixes
- file.c split layout retained; security-hardened secure-fs helpers (open_secure_parent/to_disk_secure/rename_secure/stat_secure) now live in file.c with file_ prefix and are shared with file_receive.c - file_receive.c takes the security branch's bounded allocations (receive_data_limited, data_decompress_limited, size checks) and STATUS_ERROR signaling - file_send.c gains the data consistency check on file->data - client_validation.c: stricter --tls requiring --ca, log_message style - utils.c: hardened openat/mkdirat mkdir_r from security branch
This commit is contained in:
+3
-3
@@ -24,7 +24,7 @@ Chunk* chunk_create(File** items, int element_count) {
|
||||
return NULL;
|
||||
Chunk* chunk = (Chunk*)malloc(sizeof(Chunk));
|
||||
if (chunk == NULL) {
|
||||
perror("ERROR: Could not allocate memory for chunk structure");
|
||||
log_perror("ERROR: Could not allocate memory for chunk structure");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -160,7 +160,7 @@ Chunk* chunk_deserialize(Data* data, bool use_metadata) {
|
||||
}
|
||||
char* path = malloc(path_len + 1);
|
||||
if (path == NULL) {
|
||||
perror("Could not allocate memory for file path");
|
||||
log_perror("Could not allocate memory for file path");
|
||||
array_list_delete(files);
|
||||
return NULL;
|
||||
}
|
||||
@@ -247,7 +247,7 @@ Chunk* chunk_deserialize(Data* data, bool use_metadata) {
|
||||
size_t allocation_size = file_data_size > 0 ? file_data_size : 1;
|
||||
void* file_data = malloc(allocation_size);
|
||||
if (file_data == NULL) {
|
||||
perror("Could not allocate memory for file data");
|
||||
log_perror("Could not allocate memory for file data");
|
||||
file_destroy(file);
|
||||
array_list_delete(files);
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user