1. 31 Jan, 2019 2 commits
    • streams: fix callers potentially only writing partial data · 5265b31c
      Similar to the write(3) function, implementations of `git_stream_write`
      do not guarantee that all bytes are written. Instead, they return the
      number of bytes that actually have been written, which may be smaller
      than the total number of bytes. Furthermore, due to an interface design
      issue, we cannot ever write more than `SSIZE_MAX` bytes at once, as
      otherwise we cannot represent the number of bytes written to the caller.
      
      Unfortunately, no caller of `git_stream_write` ever checks the return
      value, except to verify that no error occurred. Due to this, they are
      susceptible to the case where only partial data has been written.
      
      Fix this by introducing a new function `git_stream__write_full`. In
      contrast to `git_stream_write`, it will always return either success or
      failure, without returning the number of bytes written. Thus, it is able
      to write all `SIZE_MAX` bytes and loop around `git_stream_write` until
      all data has been written. Adjust all callers except the BIO callbacks
      in our mbedtls and OpenSSL streams, which already do the right thing and
      require the amount of bytes written.
      Patrick Steinhardt committed
    • streams: make file-local functions static · 193e7ce9
      The callback functions that implement the `git_stream` structure are
      only used inside of their respective implementation files, but they are
      not marked as `static`. Fix this.
      Patrick Steinhardt committed
  2. 30 Jan, 2019 1 commit
  3. 28 Jan, 2019 7 commits
  4. 27 Jan, 2019 3 commits
  5. 26 Jan, 2019 4 commits
  6. 25 Jan, 2019 23 commits