bugGNU Wget - Bugs: bug #60353, On 32-bit arm, wget is unable to...

 
 

bug #60353: On 32-bit arm, wget is unable to download a file bigger than 2GiB

Submitter:  Michal Ruprich <formaiko>
Submitted:  Wed 07 Apr 2021 10:51:42 AM UTC
   
 
Category:  Program Logic Severity:  3 - Normal
Priority:  5 - Normal Status:  Fixed
Privacy:  Public Assigned to:  rockdaboot
Originator Name:  Open/Closed:  Closed
Release:  None Operating System:  GNU/Linux
Reproducibility:  Every Time Fixed Release:  None
Planned Release:  None Regression:  Yes
Work Required:  None Patch Included:  Yes
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 11 Apr 2021 11:00:53 AM UTC, comment #1: 

Thanks for reporting.

The regression has been introduced in 1.21  by commit 8b1aeab78314ecdeaccbcd72e3589887d717f218.

Fixed in in the repository, will be included in the next release.

Tim Ruehsen <rockdaboot>
Group administrator
Wed 07 Apr 2021 10:51:42 AM UTC, original submission:  

On 32-bit arm, if you try to download a file bigger than 2GiB, the download size is always exactly 2GiB(for instance get the raw image of Fedora from https://getfedora.org/en/workstation/download/ which has 3 GiB). It is caused by the line:

#define str_to_wgint strtol

in wget.h. On 32-bit arch when downloading big file, in http.c, the parsed always gets its maximum value 2147483647:

parsed = str_to_wgint (hdrval, NULL, 10);

If we change strtol to strtoll this will solve the problem on 32-bit arches and does not disrupt anything on 64-bit arch - I think that long and long long are mostly 8B long on most systems(I might be wrong though).

Version of wget is 1.21.1. Tested on Fedora 33.

Michal Ruprich <formaiko>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #51204:  strtol.patch added by formaiko (297B - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rockdaboot (Posted a comment)
  • -email is unavailable- added by formaiko (Submitted the item)
  •  

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-04-11 rockdaboot StatusNone Fixed
        Assigned toNone rockdaboot
        Open/ClosedOpen Closed
        RegressionNone Yes
    2021-04-07 formaiko Attached File- Added strtol.patch, #51204

    Back to the top

    Powered by Savane 3.13-b921.
    Corresponding source code