From 8c1cb41e7001c7660247902fcae75308c1e5c417 Mon Sep 17 00:00:00 2001 From: lemoer Date: Thu, 1 Sep 2016 18:11:48 +0200 Subject: [PATCH] respondd: negative max timeouts are not allowed any longer Fixes: Supplying a negative max delay caused nearly infinite delay due to an integer overflow. --- net/respondd/src/respondd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/respondd/src/respondd.c b/net/respondd/src/respondd.c index 720c93d..2b8d2af 100644 --- a/net/respondd/src/respondd.c +++ b/net/respondd/src/respondd.c @@ -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); }