respondd: negative max timeouts are not allowed any longer

Fixes: Supplying a negative max delay caused nearly infinite delay
due to an integer overflow.
This commit is contained in:
lemoer 2016-09-01 18:11:48 +02:00
parent 92155f0c51
commit 8c1cb41e70
1 changed files with 1 additions and 1 deletions

View File

@ -592,7 +592,7 @@ int main(int argc, char **argv) {
case 't':
max_multicast_delay = 1000 * strtoul(optarg, &endptr, 10);
if (!*optarg || *endptr) {
if (!*optarg || *endptr || max_multicast_delay > INT64_MAX) {
fprintf(stderr, "Invalid multicast delay\n");
exit(EXIT_FAILURE);
}