1. 17 Sep, 2018 2 commits
    • revwalk: only check the first commit in the list for an earlier timestamp · 12a1790d
      This is not a big deal, but it does make us match git more closely by checking
      only the first. The lists are sorted already, so there should be no functional
      difference other than removing a possible check from every iteration in the
      loop.
      Carlos Martín Nieto committed
    • revwalk: use the max value for a signed integer · 46f35127
      When porting, we overlooked that the difference between git's and our's time
      representation and copied their way of getting the max value.
      
      Unfortunately git was using unsigned integers, so `~0ll` does correspond to
      their max value, whereas for us it corresponds to `-1`. This means that we
      always consider the last date to be smaller than the current commit's and always
      think commits are interesting.
      
      Change the initial value to the macro that gives us the maximum value on each
      platform so we can accurately consider commits interesting or not.
      Carlos Martín Nieto committed
  2. 09 Sep, 2018 1 commit
  3. 08 Sep, 2018 1 commit
  4. 07 Sep, 2018 2 commits
  5. 06 Sep, 2018 19 commits
  6. 05 Sep, 2018 1 commit
    • Prevent heap-buffer-overflow · d22cd1f4
      When running repack while doing repo writes, `packfile_load__cb()` can see some temporary files in the directory that are bigger than the usual, and makes `memcmp` overflow on the `p->pack_name` string. ASAN detected this. This just uses `strncmp`, that should not have any performance impact and is safe for comparing strings of different sizes.
      
      ```
      ERROR: AddressSanitizer: heap-buffer-overflow on address 0x61200001a3f3 at pc 0x7f4a9e1976ec bp 0x7ffc1f80e100 sp 0x7ffc1f80d8b0
      READ of size 89 at 0x61200001a3f3 thread T0
      SCARINESS: 26 (multi-byte-read-heap-buffer-overflow)
          #0 0x7f4a9e1976eb in __interceptor_memcmp.part.78 (/build/cfgr-admin#link-tree/libtools_build_sanitizers_asan-ubsan-py.so+0xcf6eb)
          #1 0x7f4a518c5431 in packfile_load__cb /build/libgit2/0.27.0/src/libgit2-0.27.0/src/odb_pack.c:213
          #2 0x7f4a518d9582 in git_path_direach /build/libgit2/0.27.0/src/libgit2-0.27.0/src/path.c:1134
          #3 0x7f4a518c58ad in pack_backend__refresh /build/libgit2/0.27.0/src/libgit2-0.27.0/src/odb_pack.c:347
          #4 0x7f4a518c1b12 in git_odb_refresh /build/libgit2/0.27.0/src/libgit2-0.27.0/src/odb.c:1511
          #5 0x7f4a518bff5f in git_odb__freshen /build/libgit2/0.27.0/src/libgit2-0.27.0/src/odb.c:752
          #6 0x7f4a518c17d4 in git_odb_stream_finalize_write /build/libgit2/0.27.0/src/libgit2-0.27.0/src/odb.c:1415
          #7 0x7f4a51b9d015 in Repository_write /build/pygit2/0.27.0/src/pygit2-0.27.0/src/repository.c:509
      ```
      bisho committed
  7. 03 Sep, 2018 3 commits
  8. 02 Sep, 2018 1 commit
  9. 01 Sep, 2018 1 commit
  10. 31 Aug, 2018 2 commits
  11. 30 Aug, 2018 5 commits
  12. 29 Aug, 2018 2 commits