]> git.99rst.org Git - git.git/commit
daemon: replace atoi() with strtoul_ui() and strtol_i()
authorUsman Akinyemi <redacted>
Thu, 24 Oct 2024 00:24:56 +0000 (00:24 +0000)
committerTaylor Blau <redacted>
Thu, 24 Oct 2024 18:03:43 +0000 (14:03 -0400)
commitcc4023477f3c958b77c64b7f36f91b4f9d7c5a58
treebd61c6cec5ebe9ca7d6133b5771e69877e03dfd9
parent34b6ce9b30747131b6e781ff718a45328aa887d0
daemon: replace atoi() with strtoul_ui() and strtol_i()

Replace atoi() with strtoul_ui() for --timeout and --init-timeout
(non-negative integers) and with strtol_i() for --max-connections
(signed integers). This improves error handling and input validation
by detecting invalid values and providing clear error messages.
Update tests to ensure these arguments are properly validated.

Signed-off-by: Usman Akinyemi <redacted>
Signed-off-by: Taylor Blau <redacted>
daemon.c
t/t5570-git-daemon.sh
git clone https://git.99rst.org/PROJECT