代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/wget 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From e2c0c2fbe5efd5da5524553189e376d53194a037 Mon Sep 17 00:00:00 2001
From: Tim Rühsen <tim.ruehsen@gmx.de>
Date: Thu, 12 Dec 2019 16:14:57 +0100
Subject: [PATCH] * src/progress.c (print_row_stats): Fix two integer overflows
---
src/progress.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/progress.c b/src/progress.c
index 96d00398..4217c620 100644
--- a/src/progress.c
+++ b/src/progress.c
@@ -303,6 +303,9 @@ print_row_stats (struct dot_progress *dp, double dltime, bool last)
/* For last row also count bytes accumulated after last dot */
bytes_displayed += dp->accumulated;
+ if (bytes_displayed < 0)
+ bytes_displayed = 0;
+
if (dp->total_length)
{
/* Round to floor value to provide gauge how much data *has*
@@ -338,9 +341,9 @@ print_row_stats (struct dot_progress *dp, double dltime, bool last)
Belperchinov-Shabanski's "wget-new-percentage" patch. */
if (dp->total_length)
{
- wgint bytes_remaining = dp->total_length - bytes_displayed;
+ wgint bytes_remaining = dp->total_length > bytes_displayed ? dp->total_length - bytes_displayed : 0;
/* The quantity downloaded in this download run. */
- wgint bytes_sofar = bytes_displayed - dp->initial_length;
+ wgint bytes_sofar = bytes_displayed > dp->initial_length ? bytes_displayed - dp->initial_length : 1;
double eta = dltime * bytes_remaining / bytes_sofar;
if (eta < 0)
eta = 0;
--
2.19.1.windows.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。