1. 06 Jan, 2017 2 commits
    • smart_pkt: treat empty packet lines as error · 2fdef641
      The Git protocol does not specify what should happen in the case
      of an empty packet line (that is a packet line "0004"). We
      currently indicate success, but do not return a packet in the
      case where we hit an empty line. The smart protocol was not
      prepared to handle such packets in all cases, though, resulting
      in a `NULL` pointer dereference.
      
      Fix the issue by returning an error instead. As such kind of
      packets is not even specified by upstream, this is the right
      thing to do.
      Patrick Steinhardt committed
    • smart_pkt: verify packet length exceeds PKT_LEN_SIZE · 66e3774d
      Each packet line in the Git protocol is prefixed by a four-byte
      length of how much data will follow, which we parse in
      `git_pkt_parse_line`. The transmitted length can either be equal
      to zero in case of a flush packet or has to be at least of length
      four, as it also includes the encoded length itself. Not
      checking this may result in a buffer overflow as we directly pass
      the length to functions which accept a `size_t` length as
      parameter.
      
      Fix the issue by verifying that non-flush packets have at least a
      length of `PKT_LEN_SIZE`.
      Patrick Steinhardt committed
  2. 20 Dec, 2016 6 commits
  3. 19 Dec, 2016 6 commits
  4. 18 Dec, 2016 2 commits
  5. 17 Dec, 2016 5 commits
  6. 16 Dec, 2016 2 commits
  7. 12 Dec, 2016 10 commits
  8. 07 Dec, 2016 2 commits
  9. 06 Dec, 2016 1 commit
  10. 04 Dec, 2016 1 commit
  11. 03 Dec, 2016 1 commit
  12. 02 Dec, 2016 1 commit
    • git_rebase_init: correctly handle detached HEAD · 4db1fc7e
      git_rebase_finish relies on head_detached being set, but
      rebase_init_merge was only setting it when branch->ref_name was unset.
      But branch->ref_name would be set to "HEAD" in the case of detached
      HEAD being either implicitly (NULL) or explicitly passed to
      git_rebase_init.
      David Turner committed
  13. 20 Nov, 2016 1 commit