Tweak the get_root_changes_offset() routine in order to fix the problems I
identified in http://svn.haxx.se/dev/archive-2014-02/0189.shtml
This changeset fixes the following issues in its implementation:

- It avoids seeking to a negative offset for the scenarios when the revision
  file is smaller than buffer.

- It avoids touching internal svn_stringbuf_t fields (such as DATA and LEN)
  and achieves the wanted behavior using the stringbuf API only.

- We no longer rely on the allocator-specific BLOCKSIZE when determining the
  buffer size for the trailer.  In a theoretical case where the allocator
  allocates huge 2KiB blocks for every stringbuf, we would fail to parse the
  trailer for smaller (< 2KiB) revision files.

- It uses svn_io_file_read_full2() instead of svn_io_file_read() when reading
  the file block with the revision trailer.  svn_io_file_read(), as opposed
  to svn_io_file_read_full2(), can read any number of bytes <= NBYTES before
  exiting.  This essentially means we would fail to parse the revision
  trailer in all scenarios where this function returns without filling
  the buffer.

* subversion/libsvn_fs_fs/cached_data.c
  (get_root_changes_offset): Create the stringbuf around a stack-allocated
    BUFFER.  Do that only when the buffer is filled (thus avoiding the
    necessity to touch the internal stringbuf fields, i.e. DATA, LEN and
    BLOCKSIZE).  Handle the possibility of revision files being smaller than
    the expected trailer block size (64 bytes).  Do not attempt seeking to
    negative file offsets in that case.  Finally, use svn_io_file_read_full2()
    instead of svn_io_file_read() when reading the file contents.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1573794 13f79535-47bb-0310-9956-ffa450edef68
* subversion/libsvn_wc/deprecated.c
  (svn_wc_read_kind): Remove some commented-out code and an unreached return.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1573800 13f79535-47bb-0310-9956-ffa450edef68
* subversion/tests/libsvn_client/mtcc-test.c
  (verify_mtcc_commit): Remove spurious semi-colon.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1573801 13f79535-47bb-0310-9956-ffa450edef68