Phase 1+2: bug fixes and dead code cleanup #4

Merged
TapTap merged 1 commits from bugfix-cleanup into main 2026-07-16 12:11:31 +02:00
Owner

Phase 1 — Bug fixes:

  1. receive_data: fix unsigned long long vs size_t mismatch (32-bit stack overflow)
  2. chunk_deserialize: add NULL check in both receive paths
  3. file_content_to_buffer: fix FILE handle leak on error
  4. send_files_multithreaded: propagate sender thread result instead of always 0
  5. server: add SIGPIPE handler
  6. to_disk: check fwrite return value
  7. scanner: use S_ISDIR instead of !S_ISREG
  8. scanner: free cur_path before early return

Phase 2 — Dead code cleanup:
9. Remove unused chunk_decompress
10. Remove unused array_list_clear
11. Remove unused num_connections config field
12. Remove duplicate FILE_METADATA_WIRE_SIZE macro

Phase 1 — Bug fixes: 1. receive_data: fix unsigned long long vs size_t mismatch (32-bit stack overflow) 2. chunk_deserialize: add NULL check in both receive paths 3. file_content_to_buffer: fix FILE handle leak on error 4. send_files_multithreaded: propagate sender thread result instead of always 0 5. server: add SIGPIPE handler 6. to_disk: check fwrite return value 7. scanner: use S_ISDIR instead of !S_ISREG 8. scanner: free cur_path before early return Phase 2 — Dead code cleanup: 9. Remove unused chunk_decompress 10. Remove unused array_list_clear 11. Remove unused num_connections config field 12. Remove duplicate FILE_METADATA_WIRE_SIZE macro
TapTap added 1 commit 2026-07-16 12:08:15 +02:00
Phase 1 — Bugs:
- receive_data: fix unsigned long long vs size_t mismatch
- chunk_deserialize: add NULL check in multiprocessing.c and server.c
- file_content_to_buffer: add missing fclose on error path
- send_files_multithreaded: propagate sender thread result
- server: add SIGPIPE handler
- to_disk: check fwrite return value
- scanner: use S_ISDIR instead of !S_ISREG
- scanner: free cur_path before early return

Phase 2 — Cleanup:
- Remove unused chunk_decompress function
- Remove unused array_list_clear function
- Remove unused num_connections config field
- Remove duplicate FILE_METADATA_WIRE_SIZE macro
- Update tests for removed APIs
TapTap merged commit 270623b90e into main 2026-07-16 12:11:31 +02:00
TapTap deleted branch bugfix-cleanup 2026-07-16 12:11:36 +02:00
Sign in to join this conversation.