BusyBox Bug and Patch Tracking
BusyBox
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001072 [BusyBox] Networking Support major always 10-13-06 03:54 10-15-06 18:19
Reporter rockeychu View Status public  
Assigned To BusyBox
Priority normal Resolution fixed  
Status closed   Product Version svn
Summary 0001072: "nc" can't work any more (with patched)
Description nc can't work cause of defined incorrect type of 'opt', patched as following:

Index: networking/nc.c
===================================================================
--- networking/nc.c (revision 16376)
+++ networking/nc.c (working copy)
@@ -17,7 +17,7 @@
 int nc_main(int argc, char **argv)
 {
        int sfd = 0, cfd;
- unsigned opt;
+ int opt;
        unsigned lport = 0, wsecs = 0, delay = 0;
        unsigned do_listen = 0, execflag = 0;
        struct sockaddr_in address;
Additional Information
Attached Files

- Relationships

- Notes
(0001705)
vda
10-15-06 13:48

Care to explain? At least explain what kind of error you get...
 
(0001706)
rockeychu
10-15-06 18:16
edited on: 10-15-06 18:16

Sorry for my carelessness.

If without this patch, nc can't do any thing, such as:

   nc 192.168.0.1 23
   nc -l -p 8000
   ...

they all show usages only. The reason is:

getopt() will reutrn a "int" result (shall return -1 when all command line options are parsed.), but revision 16376 assigned it as "usigned opt", so -1 will be treat as positive number and always greater than 0.

 
(0001707)
vda
10-15-06 18:19

Fixed in rev 16393. nc was quite buggy in other respects.
Please test and reopen if doesn't work.
 

- Issue History
Date Modified Username Field Change
10-13-06 03:54 rockeychu New Issue
10-13-06 03:54 rockeychu Status new => assigned
10-13-06 03:54 rockeychu Assigned To  => BusyBox
10-15-06 13:48 vda Note Added: 0001705
10-15-06 18:16 rockeychu Note Added: 0001706
10-15-06 18:16 rockeychu Note Edited: 0001706
10-15-06 18:19 vda Status assigned => closed
10-15-06 18:19 vda Note Added: 0001707
10-15-06 18:19 vda Resolution open => fixed


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker