From: David Schweikert Date: Tue, 23 Jul 2013 21:40:17 +0000 (+0200) Subject: Fix loop issue after 65536 pings (reported by Peter Folk and GBert, #12), Minimum... X-Git-Url: https://git.gsnw.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7e55f0b0739eae9e53e3bca52af16ac4b6538dec;p=fping.git Fix loop issue after 65536 pings (reported by Peter Folk and GBert, #12), Minimum ping data size is now 0 --- diff --git a/ChangeLog b/ChangeLog index e4695dc..caf7968 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +UNRELEASED + * Fix loop issue after 65536 pings (reported by Peter Folk and GBert, #12) + * Minimum ping data size is now 0 + 2013-05-22 David Schweikert * Version 3.5 * Fix sprint_tm buffer size crash (reported by Japheth Cleaver) diff --git a/src/fping.c b/src/fping.c index c2bfb3c..f9a5978 100644 --- a/src/fping.c +++ b/src/fping.c @@ -526,7 +526,9 @@ int main( int argc, char **argv ) break; case 'b': - if( !( ping_data_size = ( unsigned int )atoi( optarg ) ) ) + errno = 0; + ping_data_size = (unsigned int) strtol(optarg, (char **)NULL, 10); + if( errno ) usage(1); break;