Block a user
fix: add NULL-checks and input validation in CLI argument parsing (#152)
=== PR REVIEW SUMMARY === Branch: fix/null-checks-cli (PR #153) Files: 1 (src/client/client_cli.c) Issues: 8 (0 critical, 2 warning, 6 style)
=== VERDICT === [PASS] All 22 tests pass, build…
Security: Delta and chunk deserialization don't validate array counts/sizes from network
Bug/Security: chown() failures during metadata restoration are silently ignored
Bug/Performance: sendfile() loop treats EAGAIN / EINTR as fatal errors
Bug: Server receive_thread doesn't propagate file_receive / chunk receive errors
Bug: client_cli.c may free() a string literal for server_host
Bug/Quality: Protocol layer uses global I/O state; io_ssl is not thread-local
Bug: Transfer functions return -1, causing implementation-defined exit status
Bug: --delete manifest sending ignores send_status / send_int / send_str failures
Security: --delete follows symlinks and may delete outside destination tree
Security: TLS client lacks hostname verification
Security: TLS I/O doesn't handle SSL_ERROR_WANT_READ / SSL_ERROR_WANT_WRITE
Security: zstd decompression may allocate ZSTD_CONTENTSIZE_UNKNOWN bytes
Bug: Server leaks Config in non-multithreaded handler path
Security: Metadata restoration applies arbitrary mode bits including setuid/setgid
Security: Unbounded wire sizes enable OOM denial of service
Bug: Missing NULL-checks and weak input validation in CLI argument parsing
Refactor: send_files() and send_files_multithreaded() share massive code duplication