reactos/base/applications/network/netstat
Joachim Henze 40864bc15c
[NETSTAT] Fix crash when parsing the protocol CORE-19005 (#5363)
fixes symptom CORE-19005 [NETSTAT] crashes when called with -abnop
and no further argument (protocol name missing).

The crash was a regression of
0.4.11-dev-814-g 2b55073360

also meticulously try to match Windows exact screen output and ERRORLEVEL then
instead of e.g.: simply showing the usage help
which means:
ERRORLEVEL 0 for 'netstat -abnop' and displaying Active-string + table header *but without any sane contents*
ERRORLEVEL 1 for 'netstat -abnop bullshit' and displaying usage help
ERRORLEVEL 0 for 'netstat -abnop tcp' and displaying Active-string + table header + contents
ERRORLEVEL 0 for 'netstat -abnop udp' and displaying Active-string + table header + contents

while touching the file do also some unrelated whitespace tweaks.
2023-06-29 22:33:53 +02:00
..
lang [TRANSLATION] Chinese Traditional (zh-TW) translation update (#3954) 2021-10-10 15:00:44 +03:00
CMakeLists.txt [NETSTAT] Convert the netstat utility to Unicode, and localize it. (#1657) 2019-06-20 20:48:07 +02:00
netstat.c [NETSTAT] Fix crash when parsing the protocol CORE-19005 (#5363) 2023-06-29 22:33:53 +02:00
netstat.h [NETSTAT] Simplify some code; don't use exit(); call WSACleanup() on exit. 2019-06-29 18:10:43 +02:00
netstat.rc [TRANSLATION] Chinese Traditional (zh-TW) translation update (#3954) 2021-10-10 15:00:44 +03:00
resource.h [NETSTAT] Convert the netstat utility to Unicode, and localize it. (#1657) 2019-06-20 20:48:07 +02:00