[packages/fping] Rel 2. Fix crash on "fping -0".
arekm
arekm at pld-linux.org
Thu Oct 29 08:34:05 CET 2026
commit e7d4e13786e1d154a7f7c73f16f9993099d7ba31
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Thu Oct 29 02:24:48 2026 +0100
Rel 2. Fix crash on "fping -0".
fping-long-only-options.patch | 47 +++++++++++++++++++++++++++++++++++++++++++
fping.spec | 8 +++++---
2 files changed, 52 insertions(+), 3 deletions(-)
---
diff --git a/fping.spec b/fping.spec
index 83fd531..4ec4cc8 100644
--- a/fping.spec
+++ b/fping.spec
@@ -3,12 +3,13 @@ Summary(pl.UTF-8): fping - ping sprawdzający wiele hostów naraz
Summary(pt_BR.UTF-8): Ferramenta para enviar pings para várias máquinas de uma só vez
Name: fping
Version: 5.5
-Release: 1
+Release: 2
License: distributable
Group: Networking/Utilities
-Source0: http://fping.org/dist/%{name}-%{version}.tar.gz
+Source0: https://fping.org/dist/%{name}-%{version}.tar.gz
# Source0-md5: e86e7b9dab40338f634cf7586ecd5f02
-URL: http://fping.org/
+Patch0: %{name}-long-only-options.patch
+URL: https://fping.org/
BuildRequires: autoconf >= 2.59
BuildRequires: automake
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -48,6 +49,7 @@ tempo.
%prep
%setup -q
+%patch -P0 -p1
%build
%{__aclocal}
diff --git a/fping-long-only-options.patch b/fping-long-only-options.patch
new file mode 100644
index 0000000..225c724
--- /dev/null
+++ b/fping-long-only-options.patch
@@ -0,0 +1,47 @@
+"fping -0" crashed: long-only options shared the short name '0'.
+https://github.com/schweikert/fping/commit/977d47f333
+
+--- fping-5.5.orig/src/fping.c
++++ fping-5.5/src/fping.c
+@@ -641,7 +641,7 @@
+ { "vcount", 'C', OPTPARSE_REQUIRED },
+ { "rdns", 'd', OPTPARSE_NONE },
+ { "timestamp", 'D', OPTPARSE_NONE },
+- { "timestamp-format", '0', OPTPARSE_REQUIRED },
++ { "timestamp-format", 0, OPTPARSE_REQUIRED },
+ { "elapsed", 'e', OPTPARSE_NONE },
+ { "file", 'f', OPTPARSE_REQUIRED },
+ { "generate", 'g', OPTPARSE_NONE },
+@@ -650,7 +650,7 @@
+ { "interval", 'i', OPTPARSE_REQUIRED },
+ { "iface", 'I', OPTPARSE_REQUIRED },
+ { "json", 'J', OPTPARSE_NONE },
+- { "icmp-timestamp", '0', OPTPARSE_NONE },
++ { "icmp-timestamp", 0, OPTPARSE_NONE },
+ #ifdef SO_MARK
+ { "fwmark", 'k', OPTPARSE_REQUIRED },
+ #endif
+@@ -674,10 +674,10 @@
+ { "version", 'v', OPTPARSE_NONE },
+ { "reachable", 'x', OPTPARSE_REQUIRED },
+ { "fast-reachable", 'X', OPTPARSE_REQUIRED },
+- { "check-source", '0', OPTPARSE_NONE },
+- { "print-tos", '0', OPTPARSE_NONE },
+- { "print-ttl", '0', OPTPARSE_NONE },
+- { "seqmap-timeout", '0', OPTPARSE_REQUIRED },
++ { "check-source", 0, OPTPARSE_NONE },
++ { "print-tos", 0, OPTPARSE_NONE },
++ { "print-ttl", 0, OPTPARSE_NONE },
++ { "seqmap-timeout", 0, OPTPARSE_REQUIRED },
+ #if defined(DEBUG) || defined(_DEBUG)
+ { NULL, 'z', OPTPARSE_REQUIRED },
+ #endif
+@@ -687,7 +687,7 @@
+ double opt_val_double;
+ while ((c = optparse_long(&optparse_state, longopts, NULL)) != EOF) {
+ switch (c) {
+- case '0':
++ case 0:
+ if(strstr(optparse_state.optlongname, "timestamp-format") != NULL) {
+ if(strcmp(optparse_state.optarg, "ctime") == 0) {
+ timestamp_format_flag = 1;
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/fping.git/commitdiff/e7d4e13786e1d154a7f7c73f16f9993099d7ba31
More information about the pld-cvs-commit
mailing list