Batch fix: NULL checks, input validation, and code refactoring (#152, #149, #150, #151) #171

Closed
TapTap wants to merge 3 commits from integration/2026-07-29-batch-fix into main
Owner

Batch fix merging two branches: fix/null-checks-cli (#152) and fix/refactor-cli-config (#149, #150, #151)

Batch fix merging two branches: fix/null-checks-cli (#152) and fix/refactor-cli-config (#149, #150, #151)
TapTap added 3 commits 2026-07-29 18:36:42 +02:00
fix: add NULL-checks and input validation in CLI argument parsing (#152)
CI / lint (pull_request) Successful in 12s
CI / sanitizers (address) (pull_request) Successful in 16s
CI / sanitizers (undefined) (pull_request) Successful in 16s
CI / coverage (pull_request) Successful in 10s
CI / fuzz-build (pull_request) Successful in 13s
CI / valgrind (pull_request) Successful in 12s
CI / build-and-test (pull_request) Successful in 54s
c75ccfd80b
- Add NULL-checks for all str_dup() calls in argument parsing
- Replace atoi with strtol + endptr validation for port numbers
- Add errno/endptr validation for strtoull calls (--max-size, --min-size)
- Check str_dup result for exclude/include patterns, server-host, backup-dir
- Validate positional directory arguments for allocation failure
refactor: config_create(), main(), send_files() - reduce duplication and complexity
CI / lint (pull_request) Failing after 11s
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
0021ca3fcd
- #150: Replace 11-parameter config_create() with config_create() that
  initializes to sensible defaults; callers set fields directly
- #149: Extract validate_config() from main(); reduce main() from 325 to
  281 lines by extracting validation logic into separate function
- #151: Extract run_dry_run(), connect_to_server(), send_manifest(), and
  print_progress() shared helpers from send_files()/send_files_multithreaded()
  to eliminate code duplication
Merge remote-tracking branch 'origin/fix/refactor-cli-config' into integration/2026-07-29-batch-fix
CI / lint (pull_request) Failing after 12s
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
26be780da2
TapTap closed this pull request 2026-07-29 18:40:38 +02:00
Some checks are pending
CI / lint (pull_request) Failing after 12s
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

Pull request closed

Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: TapTap/FastSync#171