update fix-buffer-overflows-in-progress-bar-code.patch.

This commit is contained in:
IT砖瓦工 2020-05-23 14:50:53 +08:00 committed by Gitee
parent 547ef6ef4a
commit ef60525451

View File

@ -111,7 +111,7 @@ index 02b6f04d..96d00398 100644
int units = 0;
/* Calculate the download speed using the history ring and
recent data that hasn't made it to the ring yet. */
@@ -1192,12 +1211,18 @@ create_image (struct bar_progress *bp, double dl_total_time, bool done)
@@ -1192,12 +1211,16 @@ create_image (struct bar_progress *bp, double dl_total_time, bool done)
}
}
@ -125,8 +125,6 @@ index 02b6f04d..96d00398 100644
- *p = '\0';
+ if (padding > 0)
+ {
+// if (padding > BUF_LEN - (p - bp->buffer) - 1)
+// padding = BUF_LEN - (p - bp->buffer) - 1;
+ memset (p, ' ', padding);
+ p += padding;
+ *p = '\0';