[proftpd-dfsg] 01/01: Add patch for #823409.
Hilmar Preuße
hilmar-guest at moszumanska.debian.org
Fri Dec 23 11:41:01 UTC 2016
This is an automated email from the git hooks/post-receive script.
hilmar-guest pushed a commit to branch master
in repository proftpd-dfsg.
commit 129bf34e02d3ccf6144c15dc6ee070fa50e29a58
Author: Hilmar Preuße <hille42 at web.de>
Date: Fri Dec 23 12:40:19 2016 +0100
Add patch for #823409.
---
debian/changelog | 3 ++
debian/patches/bug_4277_deb_823409 | 60 ++++++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 64 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 2819ccc..3e90fdf 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -13,6 +13,9 @@ proftpd-dfsg (1.3.5b-2) unstable; urgency=medium
When handling unclosed files for an aborted SFTP session, we will
need a valid response pool. So provide one. The lack of this may have
been causing some segfaults. (LP: #1647094)
+ * Patch bug_4277_deb_823409
+ Upstream identified another Memleak, occuring when /uploading/ large
+ files; affects only 1.3.5 line. Patch hopefully (Closes: #823409).
[ Francesco Paolo Lovergine ]
* Makes piuparts happy by removing /srv/ftp on purge
diff --git a/debian/patches/bug_4277_deb_823409 b/debian/patches/bug_4277_deb_823409
new file mode 100644
index 0000000..3ff6c26
--- /dev/null
+++ b/debian/patches/bug_4277_deb_823409
@@ -0,0 +1,60 @@
+Index: proftpd-dfsg/src/data.c
+===================================================================
+--- proftpd-dfsg.orig/src/data.c 2016-12-11 11:23:04.000000000 +0100
++++ proftpd-dfsg/src/data.c 2016-12-23 12:27:11.000000000 +0100
+@@ -1154,6 +1154,7 @@
+ if (session.xfer.direction == PR_NETIO_IO_RD) {
+ char *buf = session.xfer.buf;
+ pr_buffer_t *pbuf;
++ pool *tmp_pool;
+
+ if (session.sf_flags & (SF_ASCII|SF_ASCII_OVERRIDE)) {
+ int adjlen, buflen;
+@@ -1186,10 +1187,13 @@
+ }
+
+ /* Before we process the data read from the client, generate an event
+- * for any listeners which may want to examine this data.
++ * for any listeners which may want to examine this data. Use a
++ * temporary pool, so that we don't exhaust the transfer pool for
++ * long/large transfers (Bug#4277).
+ */
+
+- pbuf = pcalloc(session.xfer.p, sizeof(pr_buffer_t));
++ tmp_pool = make_sub_pool(session.xfer.p);
++ pbuf = pcalloc(tmp_pool, sizeof(pr_buffer_t));
+ pbuf->buf = buf;
+ pbuf->buflen = len;
+ pbuf->current = pbuf->buf;
+@@ -1200,6 +1204,7 @@
+ /* The event listeners may have changed the data to write out. */
+ buf = pbuf->buf;
+ len = pbuf->buflen - pbuf->remaining;
++ destroy_pool(tmp_pool);
+
+ if (len > 0) {
+ buflen += len;
+@@ -1289,10 +1294,13 @@
+
+ if (len > 0) {
+ /* Before we process the data read from the client, generate an event
+- * for any listeners which may want to examine this data.
++ * for any listeners which may want to examine this data. Use a
++ * temporary pool, so that we don't exhaust the transfer pool for
++ * long/large transfers (Bug#4277).
+ */
+
+- pbuf = pcalloc(session.xfer.p, sizeof(pr_buffer_t));
++ tmp_pool = make_sub_pool(session.xfer.p);
++ pbuf = pcalloc(tmp_pool, sizeof(pr_buffer_t));
+ pbuf->buf = buf;
+ pbuf->buflen = len;
+ pbuf->current = pbuf->buf;
+@@ -1303,6 +1311,7 @@
+ /* The event listeners may have changed the data to write out. */
+ buf = pbuf->buf;
+ len = pbuf->buflen - pbuf->remaining;
++ destroy_pool(tmp_pool);
+
+ /* Non-ASCII mode doesn't need to use session.xfer.buf */
+ if (timeout_stalled) {
diff --git a/debian/patches/series b/debian/patches/series
index 3f57e45..daa2a99 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -15,3 +15,4 @@ FTBS_on_Hurd
reproducible_build
not_read_whole_passwd_db
github_305_handling_unclosed_files
+bug_4277_deb_823409
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-proftpd/proftpd-dfsg.git
More information about the Pkg-proftpd-maintainers
mailing list