]> git.gsnw.org Git - fping.git/commitdiff
Fix loop issue after 65536 pings (reported by Peter Folk and GBert, #12), Minimum...
authorDavid Schweikert <david@schweikert.ch>
Tue, 23 Jul 2013 21:40:17 +0000 (23:40 +0200)
committerDavid Schweikert <david@schweikert.ch>
Tue, 23 Jul 2013 21:40:17 +0000 (23:40 +0200)
ChangeLog
src/fping.c

index e4695dc7fe7b600c9ec48da4faf2d592b0cfd0df..caf796888dd580cdbe6d8579964b5bee99e30e5c 100644 (file)
--- 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  <david@schweikert.ch>
   * Version 3.5
   * Fix sprint_tm buffer size crash (reported by Japheth Cleaver)
index c2bfb3c21fdfc5c04529d7518b7dfedef2b10f3f..f9a59784fad49d0b515dfc59716a8ad9f8307143 100644 (file)
@@ -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;