<<< Date Index >>>     <<< Thread Index >>>

Re: mutt_adv_mktemp() ?



On Wed, Oct 04, 2006 at 08:58:35AM -0700, Pawel S. Veselov wrote:
> It'a a little bit worse than that, actually. For this process, it's
> always '.z'. I still have it running, and it still generates these
> filenames:
> 
> mutta7aO.z
> muttb7aO.z
> muttc7aO.z

Uh.... this seems very, very broken.  I'd try running some code to
generate a series of filenames, and if you get similar results, report
it as a bug to your OS vendor.  Seems like a libc bug to me.

[mutt_adv_mktemp()]
> Notice there is no check for whether the file exists after extension
> has been added.

There is, sort of.  All of the functions which use it call safe_open()
with O_CREAT|O_EXCL.  You're right though... this isn't entirely
kosher.

-- 
Derek D. Martin    http://www.pizzashack.org/   GPG Key ID: 0xDFBEAD02
-=-=-=-=-
This message is posted from an invalid address.  Replying to it will result in
undeliverable mail.  Sorry for the inconvenience.  Thank the spammers.

Attachment: pgpUpvm5XF8am.pgp
Description: PGP signature