[Bug 6926] New: busybox nc segfaults with option -z
bugzilla at busybox.net
bugzilla at busybox.net
Wed Feb 26 07:18:01 UTC 2014
https://bugs.busybox.net/show_bug.cgi?id=6926
Summary: busybox nc segfaults with option -z
Product: Busybox
Version: 1.22.x
Platform: PC
OS/Version: Linux
Status: NEW
Severity: major
Priority: P5
Component: Networking
AssignedTo: unassigned at busybox.net
ReportedBy: lampersperger.andreas at heidenhain.de
CC: busybox-cvs at busybox.net
Estimated Hours: 0.0
You cannot use busybox nc with Option -z, because -z is mapped to -o,
e.g. I used the following command, to test if there is a running ssh
service on somehostname:
busybox nc -w 2 -z somehostname 22 ; echo $?
This fails with a segfaulting busybox. I tracked the error and found
it was introduced with the commit de6f14800675cd0401106876da81da7618de71c6
(nc_bloaty: support -ll and -lk).
Please apply the following patch to correct this error:
Index: busybox-1.22.1/networking/nc_bloaty.c
===================================================================
--- busybox-1.22.1.orig/networking/nc_bloaty.c
+++ busybox-1.22.1/networking/nc_bloaty.c
@@ -175,9 +175,9 @@ enum {
OPT_w = (1 << 5),
OPT_l = (1 << 6) * ENABLE_NC_SERVER,
OPT_k = (1 << 7) * ENABLE_NC_SERVER,
- OPT_i = (1 << (7+2*ENABLE_NC_SERVER)) * ENABLE_NC_EXTRA,
- OPT_o = (1 << (8+2*ENABLE_NC_SERVER)) * ENABLE_NC_EXTRA,
- OPT_z = (1 << (9+2*ENABLE_NC_SERVER)) * ENABLE_NC_EXTRA,
+ OPT_i = (1 << (6+2*ENABLE_NC_SERVER)) * ENABLE_NC_EXTRA,
+ OPT_o = (1 << (7+2*ENABLE_NC_SERVER)) * ENABLE_NC_EXTRA,
+ OPT_z = (1 << (8+2*ENABLE_NC_SERVER)) * ENABLE_NC_EXTRA,
};
#define o_nflag (option_mask32 & OPT_n)
--
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the busybox-cvs
mailing list