Re: Small fix for GetCurrentDirectoryA()

2005-06-10 Thread Alexandre Julliard
Felix Nawothnig <[EMAIL PROTECTED]> writes: > >> (IsBadWritePtr isn't the fastest thing in the world...) > > Just looked at the implementation - it does at most > (buflen-1)/pagesize+1 memory-references, and since buflen will be > MAX_PATH in most cases this just costs us the calling-overhead -

Re: Small fix for GetCurrentDirectoryA()

2005-06-10 Thread Uwe Bonnes
> "Felix" == Felix Nawothnig <[EMAIL PROTECTED]> writes: >>> (IsBadWritePtr isn't the fastest thing in the world...) Felix> Just looked at the implementation - it does at most Felix> (buflen-1)/pagesize+1 memory-references, and since buflen will be Felix> MAX_PATH in most cases

Re: Small fix for GetCurrentDirectoryA()

2005-06-10 Thread Felix Nawothnig
(IsBadWritePtr isn't the fastest thing in the world...) Just looked at the implementation - it does at most (buflen-1)/pagesize+1 memory-references, and since buflen will be MAX_PATH in most cases this just costs us the calling-overhead - which is worth the increased readability. -flx

Re: Small fix for GetCurrentDirectoryA()

2005-06-10 Thread Felix Nawothnig
Andreas Mohr wrote: Does Win9x GetCurrentDirectoryA() really use an IsBadWritePtr to protect against invalid output buffers? Somehow I slightly doubt it... (IsBadWritePtr isn't the fastest thing in the world...) Well, no. Looking at the disassembly it does about this: static WINE_EXCEPTION_FIL

Re: Small fix for GetCurrentDirectoryA()

2005-06-10 Thread Andreas Mohr
Hi, On Fri, Jun 10, 2005 at 07:26:33AM +0200, Felix Nawothnig wrote: > This makes Yoda Stories (which is shipped with a broken wavmix32.dll) > run out of the box. > > ChangeLog: > When emulating Win9x return ERROR_INVALID_PARAMETER if a bad buffer is > passed to GetCurrentDirectoryA(). Does Win