aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Mailbox.py
diff options
context:
space:
mode:
authorMark Sapiro <msapiro@value.net>2011-12-12 17:31:32 -0800
committerMark Sapiro <msapiro@value.net>2011-12-12 17:31:32 -0800
commit5326d6b9d132f23acfe1d79cfbd9793e9aa4a3a4 (patch)
treefb59bea3aaf135fa6f707f5329c925cc88750cf3 /Mailman/Mailbox.py
parentbc15f242a5910584d5f5e6c4667b9a72891b9548 (diff)
downloadmailman2-5326d6b9d132f23acfe1d79cfbd9793e9aa4a3a4.tar.gz
mailman2-5326d6b9d132f23acfe1d79cfbd9793e9aa4a3a4.tar.xz
mailman2-5326d6b9d132f23acfe1d79cfbd9793e9aa4a3a4.zip
Fixed an erroneous seek in the Mailman.Mailbox.Mailbox.AppendMessage
method that could cause a corrupt mailbox for files opened 'w+'. Bug #901957.
Diffstat (limited to 'Mailman/Mailbox.py')
-rw-r--r--Mailman/Mailbox.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/Mailman/Mailbox.py b/Mailman/Mailbox.py
index 1b281a4c..a7e8cced 100644
--- a/Mailman/Mailbox.py
+++ b/Mailman/Mailbox.py
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2009 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2011 by the Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -12,7 +12,8 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+# USA.
"""Extend mailbox.UnixMailbox.
"""
@@ -63,7 +64,7 @@ class Mailbox(mailbox.PortableUnixMailbox):
if self.fp.read(1) <> '\n':
self.fp.write('\n')
# Seek to the last char of the mailbox
- self.fp.seek(1, 2)
+ self.fp.seek(0, 2)
# Create a Generator instance to write the message to the file
g = Generator(self.fp)
g.flatten(msg, unixfrom=True)