Log Message: |
Fix an issue in the svn_txdelta_to_svndiff_stream() API that could cause
unexpected short reads (EOFs) on the stream.
This API is used when performing PUT requests to the server. Consequently,
the bug could result in truncated payload being sent to the server and
failing commits over http://.
* subversion/libsvn_delta/svndiff.c
(svndiff_stream_read_fn): Handle a case where we have received the final
window from the txdelta stream, but the remaining part of the buffer
cannot fully accommodate it during this call to read_fn. Instead of
exiting and triggering an unexpected short read, allow the remaining
part to be read during subsequent calls to read_fn.
* subversion/tests/libsvn_delta
(): Add 'svndiff-stream-test' to svn:ignore.
* subversion/tests/libsvn_delta/svndiff-stream-test.c: New file with a
regression test for this issue.
* build.conf
(svndiff-stream-test): New.
(__ALL_TESTS__): Run svndiff-stream-test.
|