1. 10 Apr, 2022 1 commit
  2. 05 Apr, 2022 1 commit
    • [midx] Fix an undefined behavior (left-shift signed overflow) · 33b1d3fd
      There was a missing check to ensure that the `off64_t` (which is a
      signed value) didn't overflow when parsing it from the midx file. This
      shouldn't have huge repercusions since the parsed value is immediately
      validated afterwards, but then again, there is no such thing as "benign"
      undefined behavior.
      
      This change makes all the bitwise arithmetic happen with unsigned types
      and is only casted to `off64_t` until the very end.
      
      Thanks to Taotao Gu for finding and reporting this!
      lhchavez committed
  3. 23 Feb, 2022 1 commit
  4. 28 Jan, 2022 1 commit
  5. 14 Nov, 2021 1 commit
  6. 11 Nov, 2021 3 commits
  7. 09 Nov, 2021 1 commit
  8. 28 Oct, 2021 1 commit
  9. 18 Oct, 2021 1 commit
  10. 17 Oct, 2021 2 commits
    • cmake: BUILD_CLAR is now BUILD_TESTS · 4e14d4c6
      Nobody knows what CLAR is.  The test building option should be
      `BUILD_TESTS`.
      Edward Thomson committed
    • str: introduce `git_str` for internal, `git_buf` is external · f0e693b1
      libgit2 has two distinct requirements that were previously solved by
      `git_buf`.  We require:
      
      1. A general purpose string class that provides a number of utility APIs
         for manipulating data (eg, concatenating, truncating, etc).
      2. A structure that we can use to return strings to callers that they
         can take ownership of.
      
      By using a single class (`git_buf`) for both of these purposes, we have
      confused the API to the point that refactorings are difficult and
      reasoning about correctness is also difficult.
      
      Move the utility class `git_buf` to be called `git_str`: this represents
      its general purpose, as an internal string buffer class.  The name also
      is an homage to Junio Hamano ("gitstr").
      
      The public API remains `git_buf`, and has a much smaller footprint.  It
      is generally only used as an "out" param with strict requirements that
      follow the documentation.  (Exceptions exist for some legacy APIs to
      avoid breaking callers unnecessarily.)
      
      Utility functions exist to convert a user-specified `git_buf` to a
      `git_str` so that we can call internal functions, then converting it
      back again.
      Edward Thomson committed
  11. 02 Oct, 2021 1 commit
  12. 10 Mar, 2021 1 commit
    • commit-graph: Create `git_commit_graph` as an abstraction for the file · 25b75cd9
      This change does a medium-size refactor of the git_commit_graph_file and
      the interaction with the ODB. Now instead of the ODB owning a direct
      reference to the git_commit_graph_file, there will be an intermediate
      git_commit_graph. The main advantage of that is that now end users can
      explicitly set a git_commit_graph that is eagerly checked for errors,
      while still being able to lazily use the commit-graph in a regular ODB,
      if the file is present.
      lhchavez committed
  13. 10 Jan, 2021 2 commits
  14. 05 Oct, 2020 1 commit
  15. 17 Oct, 2019 1 commit
  16. 17 Aug, 2019 1 commit
  17. 29 Jul, 2019 1 commit
  18. 20 Jul, 2019 3 commits
  19. 05 Jul, 2019 5 commits
  20. 19 May, 2019 1 commit
  21. 22 Feb, 2019 1 commit
  22. 25 Jan, 2019 1 commit
  23. 22 Jan, 2019 1 commit
  24. 17 Jan, 2019 1 commit
  25. 11 Oct, 2018 3 commits
    • fuzzers: add object parsing fuzzer · a1d5fd06
      Add a simple fuzzer that exercises our object parser code. The fuzzer
      is quite trivial in that it simply passes the input data directly to
      `git_object__from_raw` for each of the four object types.
      Patrick Steinhardt committed
    • fuzzers: initialize libgit2 in standalone driver · 6956a954
      The standalone driver for libgit2's fuzzing targets makes use of
      functions from libgit2 itself. While this is totally fine to do, we need
      to make sure to always have libgit2 initialized via `git_libgit2_init`
      before we call out to any of these. While this happens in most cases as
      we call `LLVMFuzzerInitialize`, which is provided by our fuzzers and
      which right now always calls `git_libgit2_init`, one exception to this
      rule is our error path when not enough arguments have been given. In
      this case, we will call `git_vector_free_deep` without libgit2 having
      been initialized. As we did not set up our allocation functions in that
      case, this will lead to a segmentation fault.
      
      Fix the issue by always initializing and shutting down libgit2 in the
      standalone driver. Note that we cannot let this replace the
      initialization in `LLVMFuzzerInitialize`, as it is required when using
      the "real" fuzzers by LLVM without our standalone driver. It's no
      problem to call the initialization and deinitialization functions
      multiple times, though.
      Patrick Steinhardt committed
  26. 09 Oct, 2018 1 commit
  27. 26 Aug, 2018 1 commit
  28. 16 Aug, 2018 1 commit