Boost logo

Boost :

From: Jonathan Turkanis (technews_at_[hidden])
Date: 2005-08-25 00:33:59


Dylan Trotter wrote:
> Hi,
>
> I just wanted to point out a fairly major flaw with the Windows
> implementation of memory mapped files. In memory_mapped.cpp on line
> 205-207 a file mapping is created as follows:
>
> ::CreateFileMappingA( pimpl_->handle_, NULL,
> readonly ? PAGE_READONLY :
> PAGE_READWRITE, 0, 0, p.path.c_str() );
>
> The problem with this is that if p.path.c_str() has any backslashes in
> it (very likely given that it's Windows), the call fails. From the MS
> documentation:

Thanks. I thought I eliminated the name a long time ago; I'll fix it in the
patch I'm preparing right now (and add you to the acknowledgments).

> Thanks,
>
> Dylan Trotter

Jonathan


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk