summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins-root/check_icmp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins-root/check_icmp.c b/plugins-root/check_icmp.c
index 1390a03e..f3c83ee0 100644
--- a/plugins-root/check_icmp.c
+++ b/plugins-root/check_icmp.c
@@ -361,6 +361,9 @@ check_icmp_config_wrapper process_arguments(int argc, char **argv) {
361 enforced_ai_family = AF_INET6; 361 enforced_ai_family = AF_INET6;
362 break; 362 break;
363 case 'H': { 363 case 'H': {
364 if (result.config.number_of_hosts == USHRT_MAX) {
365 usage_va("Number of specified hosts exceeds %u", USHRT_MAX);
366 }
364 result.config.number_of_hosts++; 367 result.config.number_of_hosts++;
365 break; 368 break;
366 } 369 }
@@ -378,6 +381,9 @@ check_icmp_config_wrapper process_arguments(int argc, char **argv) {
378 381
379 char **tmp = &argv[optind]; 382 char **tmp = &argv[optind];
380 while (*tmp) { 383 while (*tmp) {
384 if (result.config.number_of_hosts == USHRT_MAX) {
385 usage_va("Number of specified hosts exceeds %u", USHRT_MAX);
386 }
381 result.config.number_of_hosts++; 387 result.config.number_of_hosts++;
382 tmp++; 388 tmp++;
383 } 389 }