[Bug 901957] [NEW] Mailman.Mailbox.Mailbox.AppendMessage method can add null bytes to mailbox.

Mark Sapiro mark at msapiro.net
Fri Dec 9 02:13:15 CET 2011


Public bug reported:

The Mailman.Mailbox.Mailbox.AppendMessage method has an invalid seek to
position the file to the end of the mailbox. It contains

.        # Seek to the last char of the mailbox
.        self.fp.seek(1, 2)

This actually should be self.fp.seek(0, 2). There is no actual ill
effect in Mailman itself from this bug as Mailman always opens mailbox
files to be written to in 'a+' mode and seeks before writes are ignored
for files opened in append mode, but if someone creates a process which
opens a file in 'w+' mode and then uses the
Mailman.Mailbox.Mailbox.AppendMessage method to add messages to it, each
added message's UnixFrom is preceded by a null byte.

** Affects: mailman
     Importance: Low
     Assignee: Mark Sapiro (msapiro)
         Status: Confirmed

-- 
You received this bug notification because you are a member of Mailman
Coders, which is subscribed to GNU Mailman.
https://bugs.launchpad.net/bugs/901957

Title:
  Mailman.Mailbox.Mailbox.AppendMessage method can add null bytes to
  mailbox.

To manage notifications about this bug go to:
https://bugs.launchpad.net/mailman/+bug/901957/+subscriptions


More information about the Mailman-coders mailing list