/[Apache-SVN]
ViewVC logotype

Revision 1826747


Jump to revision: Previous Next
Author: kotkov
Date: Wed Mar 14 18:48:37 2018 UTC (6 years, 1 month ago)
Changed paths: 4
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.


Changed paths

Path Details
Directorysubversion/trunk/build.conf modified , text changed
Directorysubversion/trunk/subversion/libsvn_delta/svndiff.c modified , text changed
Directorysubversion/trunk/subversion/tests/libsvn_delta/ modified , props changed
Directorysubversion/trunk/subversion/tests/libsvn_delta/svndiff-stream-test.c added

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26