On Sun, Oct 16, 2011 at 05:21:22PM +0200, Michael Niedermayer wrote: > - fd = open(*filename, O_RDWR | O_BINARY | O_CREAT, 0444); Adding O_EXCL should increase security here. Seems supported at least on Linux and Windows. Might fail compilation on some systems though.