bug#46815: cp integer overflow in progress (time remaining)

2021-02-27 Thread Paul Eggert
On 2/27/21 1:31 PM, Ronald Knol wrote: I am looking at "src/cp.c" from coreutils-8.32 and it has command line options --progress-bar (aka -g). coreutils-8.32 doesn't have those options. Apparently you have a modified copy. You can verify this by getting the original from: https://ftp.gnu.org

bug#46815: cp integer overflow in progress (time remaining)

2021-02-27 Thread Paul Eggert
On 2/27/21 7:35 AM, Ronald Knol wrote: This is "cp -argu ". The source tree contains more than 2TiB worth of data. I believe the issue is in src/copy.c where (on line 355) an INT is used to store "cur_size". int cur_size = g_iTotalWritten + *total_n_read / 1024; GNU coreutils 'cp' lacks

bug#46815: cp integer overflow in progress (time remaining)

2021-02-27 Thread Ronald Knol
cp (GNU coreutils) 8.32 CentOS Linux release 7.4.1708 (Core) kernel 3.10.0-693.17.1.el7.x86_64 I have identified an issue with "cp" where, if more than 2 TiB of data is being copied, and progress reporting is on, after 2 TiB has been copied the time remaining overflows. The output goes like this: