Compare commits

..

1 Commits

Author SHA1 Message Date
TapTap 78fabcd781 fix: address PR #200 review issues
CI / lint (pull_request) Failing after 22s
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
- Restore PROTOCOL_VERSION to a forward-compatible 2.1.0 and document wire format
- Add NULL guard to config_delete
- Add pipeline cancellation flag and cancellation-aware queue helper
- Join running threads before destroying pipeline contexts on creation failure
- Fix NULL dereference and memory leaks in manifest/chunk handling
- Fix TLS/TCP socket fd leak on connect error paths
- Add compression-level range validation (1-22)
- Close previous log file before opening a new one
- Use getline for unbounded pattern-file lines
- Fix thread-unsafe localtime() and add log level bounds check
- Fix file_load_data to clean up data on read size mismatch
- Add hard ceiling to decompression buffer growth
- Fix mkdir_r bounds check and restore glob comments
- Add send_str NULL guard and mutex-protect bandwidth limiter
- Update AGENTS.md for per-thread io_ssl contract
2026-08-02 09:24:59 +02:00
3 changed files with 3 additions and 7 deletions
+3 -4
View File
@@ -665,10 +665,11 @@ int send_files_multithreaded(Config* config) {
if (config->use_delete)
context->manifest = array_list_create(free);
thrd_t scanner, loader, sender;
thrd_t scanner, loader, sender, progress;
bool scanner_created = false;
bool loader_created = false;
bool sender_created = false;
bool progress_created = false;
scanner_created = (thrd_create(&scanner, scan_directory_multithreaded, context) == thrd_success);
if (scanner_created)
@@ -696,8 +697,6 @@ int send_files_multithreaded(Config* config) {
return 1;
}
thrd_t progress;
bool progress_created = false;
if (config->show_progress) {
progress_created = (thrd_create(&progress, progress_thread_fn, context) == thrd_success);
if (!progress_created) {
@@ -711,7 +710,7 @@ int send_files_multithreaded(Config* config) {
thrd_join(loader, NULL);
thrd_join(sender, &sender_result);
if (progress_created) {
if (config->show_progress) {
/* Signal progress thread to exit if it hasn't already */
mtx_lock(&context->mutex_progress);
context->sender_done = true;
-1
View File
@@ -348,7 +348,6 @@ ParallelScanner* parallel_scanner_create(char* root_directory, bool use_metadata
ok = false;
}
if (ok) {
// cppcheck-suppress unreadVariable
init++;
if (cnd_init(&ps->result_not_full) != thrd_success)
ok = false;
-2
View File
@@ -48,7 +48,6 @@ PipelineContextSender* pipeline_context_sender_create(Config* config, Queue* que
init++;
if (mtx_init(&context->mutex_progress, mtx_plain) != thrd_success)
goto fail;
// cppcheck-suppress unreadVariable
init++;
return context;
@@ -107,7 +106,6 @@ PipelineContextReceiver* pipeline_context_receiver_create(Config* config, Queue*
init++;
if (cnd_init(&context->condition_not_empty) != thrd_success)
goto fail;
// cppcheck-suppress unreadVariable
init++;
return context;