diff --git a/fix-buffer-overflows-in-progress-bar-code.patch b/fix-buffer-overflows-in-progress-bar-code.patch index c9ed1af..58bc7c0 100644 --- a/fix-buffer-overflows-in-progress-bar-code.patch +++ b/fix-buffer-overflows-in-progress-bar-code.patch @@ -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';