apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan Zhakov <i...@visualsvn.com>
Subject Re: [PATCH] Fix apr_file_trunc() for buffered files on Windows and Unix
Date Mon, 27 Mar 2017 13:34:30 GMT
On 28 February 2017 at 12:38, Evgeny Kotkov <evgeny.kotkov@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

View raw message