bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #60353] On 32-bit arm, wget is unable to download a file bigger tha


From: Michal Ruprich
Subject: [bug #60353] On 32-bit arm, wget is unable to download a file bigger than 2GiB
Date: Wed, 7 Apr 2021 06:51:44 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:87.0) Gecko/20100101 Firefox/87.0

URL:
  <https://savannah.gnu.org/bugs/?60353>

                 Summary: On 32-bit arm, wget is unable to download a file
bigger than 2GiB
                 Project: GNU Wget
            Submitted by: formaiko
            Submitted on: Wed 07 Apr 2021 10:51:42 AM UTC
                Category: Program Logic
                Severity: 3 - Normal
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
                 Release: None
         Discussion Lock: Any
        Operating System: GNU/Linux
         Reproducibility: Every Time
           Fixed Release: None
         Planned Release: None
              Regression: None
           Work Required: None
          Patch Included: Yes

    _______________________________________________________

Details:

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.



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Wed 07 Apr 2021 10:51:42 AM UTC  Name: strtol.patch  Size: 297B   By:
formaiko

<http://savannah.gnu.org/bugs/download.php?file_id=51204>

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?60353>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]