]> git.gsnw.org Git - fping.git/commit
avoid crash with option -0
authorErik Auerswald <auerswal@unix-ag.uni-kl.de>
Tue, 13 Jan 2026 08:06:09 +0000 (09:06 +0100)
committerErik Auerswald <auerswal@unix-ag.uni-kl.de>
Wed, 14 Jan 2026 15:19:06 +0000 (16:19 +0100)
commit977d47f3330d0f07a32624d6fa1e519f6e098687
tree58aaf9b32e7c0c3b9c22f8615b9f7eef26bf62fc
parent00d2da83e286985b3344d5419a0d5f2d278290d7
avoid crash with option -0

Instead of using the possible option character '0' (ASCII value 0x30)
to indicate a long option without a short alias, use the value 0 as
indicator.  This value is treated specially by the used option parsing
code, and might even be the intended value to use for long-only options.

Before, using option `-0` sometimes, but not always, resulted in a
crash with `Segmentation fault (core dumped)`.

This fixes GitHub issue #456.
CHANGELOG.md
src/fping.c