fix: add NULL-checks and input validation in CLI argument parsing (#152)

- 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
This commit is contained in:
2026-07-29 18:29:21 +02:00
parent 269ce0749b
commit f868f3f3a7
3 changed files with 99 additions and 9 deletions
View File