summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2016-03-02 00:31:17 -0500
committerMike Frysinger <vapier@gentoo.org>2016-03-02 00:33:30 -0500
commit885437bfa2b7d96e6aa6dc846f0123051496b5d3 (patch)
treef786da77c37e33b71583cb30a9ec0897a1a19b5d /net-misc/wget/files
parentdev-tex/circuit_macros: remove 8.3.1 (diff)
downloadgentoo-885437bfa2b7d96e6aa6dc846f0123051496b5d3.tar.gz
gentoo-885437bfa2b7d96e6aa6dc846f0123051496b5d3.tar.bz2
gentoo-885437bfa2b7d96e6aa6dc846f0123051496b5d3.zip
net-misc/wget: add upstream fix for progress bar #410529 and use subslots w/openssl #576128 and w/gnutls #573936
Diffstat (limited to 'net-misc/wget/files')
-rw-r--r--net-misc/wget/files/wget-1.17.1-progress-bar-segv.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/net-misc/wget/files/wget-1.17.1-progress-bar-segv.patch b/net-misc/wget/files/wget-1.17.1-progress-bar-segv.patch
new file mode 100644
index 000000000000..5cfd41f17bfc
--- /dev/null
+++ b/net-misc/wget/files/wget-1.17.1-progress-bar-segv.patch
@@ -0,0 +1,35 @@
+From 7099f4899880eaefc2c40a3dc7693ab4174a819b Mon Sep 17 00:00:00 2001
+From: Darshit Shah <darnir@gmail.com>
+Date: Mon, 22 Feb 2016 15:08:15 +0100
+Subject: [PATCH] Sanitize value sent to memset to prevent SEGFAULT
+
+---
+ src/progress.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/src/progress.c b/src/progress.c
+index 93f6246..8a5df21 100644
+--- a/src/progress.c
++++ b/src/progress.c
+@@ -1164,6 +1164,8 @@ create_image (struct bar_progress *bp, double dl_total_time, bool done)
+ }
+
+ padding = bp->width - count_cols (bp->buffer);
++ assert (padding > 0 && "Padding length became non-positive!");
++ padding = padding > 0 ? padding : 0;
+ memset (p, ' ', padding);
+ p += padding;
+ *p = '\0';
+@@ -1174,6 +1176,9 @@ create_image (struct bar_progress *bp, double dl_total_time, bool done)
+ * from the release code since we do not want Wget to crash and burn when the
+ * assertion fails. Instead Wget should continue downloading and display a
+ * horrible and irritating progress bar that spams the screen with newlines.
++ *
++ * By default, all assertions are disabled in a Wget build and are enabled
++ * only with the --enable-assert configure option.
+ */
+ assert (count_cols (bp->buffer) == bp->width);
+ }
+--
+2.6.2
+