1. 25 Nov, 2019 3 commits
  2. 22 Nov, 2019 8 commits
  3. 16 Nov, 2019 3 commits
  4. 10 Nov, 2019 1 commit
    • patch_parse: use paths from "---"/"+++" lines for binary patches · de7659cc
      For some patches, it is not possible to derive the old and new file
      paths from the patch header's first line, most importantly when they
      contain spaces. In such a case, we derive both paths from the "---" and
      "+++" lines, which allow for non-ambiguous parsing. We fail to use these
      paths when parsing binary patches without data, though, as we always
      expect the header paths to be filled in.
      
      Fix this by using the "---"/"+++" paths by default and only fall back to
      header paths if they aren't set. If neither of those paths are set, we
      just return an error. Add two tests to verify this behaviour, one of
      which would have previously caused a segfault.
      Patrick Steinhardt committed
  5. 09 Nov, 2019 1 commit
  6. 06 Nov, 2019 3 commits
  7. 05 Nov, 2019 10 commits
  8. 02 Nov, 2019 1 commit
  9. 01 Nov, 2019 2 commits
  10. 30 Oct, 2019 2 commits
  11. 29 Oct, 2019 1 commit
  12. 26 Oct, 2019 1 commit
  13. 24 Oct, 2019 2 commits
  14. 22 Oct, 2019 1 commit
  15. 21 Oct, 2019 1 commit
    • patch_parse: detect overflow when calculating old/new line position · 37141ff7
      When the patch contains lines close to INT_MAX, then it may happen that
      we end up with an integer overflow when calculating the line of the
      current diff hunk. Reject such patches as unreasonable to avoid the
      integer overflow.
      
      As the calculation is performed on integers, we introduce two new
      helpers `git__add_int_overflow` and `git__sub_int_overflow` that perform
      the integer overflow check in a generic way.
      Patrick Steinhardt committed