You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Ivan Zhakov <iv...@visualsvn.com> on 2017/03/27 13:34:30 UTC

Re: [PATCH] Fix apr_file_trunc() for buffered files on Windows and Unix

On 28 February 2017 at 12:38, Evgeny Kotkov <ev...@visualsvn.com> wrote:
> Hi everyone,
>
> This patch fixes two issues with apr_file_trunc() for buffered files:
>
>  - The Win32 implementation incorrectly flushes the buffered writes _after_
>    truncating a file.  Such files will have unexpected data written after
>    the position at which they should've been truncated.  (Under Unix,
>    this issue has been fixed in https://svn.apache.org/r1044440)
>
>  - Both Win32 and Unix implementations incorrectly keep the data read into
>    a buffer after the file is truncated.  Thus, reading from a file after
>    apr_file_trunc() can return invalid data from the previous file offset.
>
Committed in r1788929. Thanks!


-- 
Ivan Zhakov