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
0001088 [BusyBox] Networking Support crash always 11-09-06 19:13 11-21-06 11:11
Reporter rockeychu View Status public  
Assigned To BusyBox
Priority normal Resolution fixed  
Status closed   Product Version svn
Summary 0001088: "wget" can't fetch ftp files with PASV mode (with patch)
Description When fetch ftp files with PASV mode, wget always reports following error:
    wget: invalid number 'XXX).'
where XXX is port number.

The simple solution is as following (or trimming PASV's port number endings ').' ):

Index: libbb/xatol.c
===================================================================
--- libbb/xatol.c (revision 16525)
+++ libbb/xatol.c (working copy)
@@ -79,8 +79,8 @@

        /* Note: trailing space is an error.
           It would be easy enough to allow though if desired. */
- if (*e)
- goto inval;
+ //if (*e)
+ // goto inval;
        /* Finally, check for range limits. */
        if (r >= lower && r <= upper)
                return r;
Additional Information
Attached Files

- Relationships

- Notes
(0001749)
vda
11-21-06 03:06

Yeah, yeah, let's kill error checks for everybody, just because we are too lazy to find the bug...

Fixed correctly in rev 16603.
 
(0001754)
rockeychu
11-21-06 04:45
edited on: 11-21-06 04:48

Sorry for my lazy to adding any code of trimming PASV's port number endings.

But rev 16603 still has same problem with "proftpd" for its ending with ").".

So, again with the following patch:

Index: networking/wget.c
===================================================================
--- networking/wget.c (revision 16606)
+++ networking/wget.c (working copy)
@@ -418,7 +418,7 @@
                // Server's IP is N1.N2.N3.N4 (we ignore it)
                // Server's port for data connection is P1*256+P2
                s = strrchr(buf, ')');
- if (s && !s[1]) s[0] = '\0';
+ if (s && (!s[1] || !s[2])) s[0] = '\0';
                s = strrchr(buf, ',');
                if (!s) goto pasv_error;
                port = xatol_range(s+1, 0, 255);

 
(0001761)
vda
11-21-06 11:11

Fixed in rev16610: we discard ')xxxxx' now, not just ')'.
 

- Issue History
Date Modified Username Field Change
11-09-06 19:13 rockeychu New Issue
11-09-06 19:13 rockeychu Status new => assigned
11-09-06 19:13 rockeychu Assigned To  => BusyBox
11-21-06 03:06 vda Status assigned => closed
11-21-06 03:06 vda Note Added: 0001749
11-21-06 03:06 vda Resolution open => fixed
11-21-06 03:06 vda Fixed in Version  => 1.2.x
11-21-06 04:45 rockeychu Status closed => feedback
11-21-06 04:45 rockeychu Resolution fixed => reopened
11-21-06 04:45 rockeychu Note Added: 0001754
11-21-06 04:48 rockeychu Note Edited: 0001754
11-21-06 11:11 vda Status feedback => closed
11-21-06 11:11 vda Note Added: 0001761
11-21-06 11:11 vda Resolution reopened => fixed


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker