plugins-root/check_icmp.c: fix unsigned short overflow (#833)
The number of targets (hosts) for check_icmp is tallied up, one at a
time, in
static unsigned short targets = 0;
When more than USHRT_MAX hosts are specified, check_icmp segfaults
before dropping privileges. This may be exploitable, and is bad in any
case. The same issue was recently fixed in monitoring-plugins:
https://www.openwall.com/lists/oss-security/2026/07/01/5
The two codebases have diverged, but the issue is easy to reproduce in
nagios-plugins as well. Afterwards, fixing it is a matter of refusing
to add_target() when there are already USHRT_MAX targets.