Subject: CVS commit: pkgsrc/converters/mpack
From: Ignatios Souvatzis
Date: 2010-11-17 23:24:41
Message id:

Log Message:
Fix decoding of message/partial. Explanation:

mpack-1.6 introduced more security on Unix-like systems by creating
and using a helper function, os_createnewfile, that uses O_CREAT|O_EXCL.
Unfortunately, it also uses it to write the total number of parts
temporary file, which fails if more than one part contains the
total number (as mpack creates them!)

The new code compares old and new totals, if both exist, and only
writes the new total, if the old didn't exist. Problem solved and
one sanity check more at the same time.