1. 02 Nov, 2016 2 commits
    • pack: fix race in pack_entry_find_offset · 0cf15e39
      In `pack_entry_find_offset`, we try to find the offset of a
      certain object in the pack file. To do so, we first assert if the
      packfile has already been opened and open it if not. Opening the
      packfile is guarded with a mutex, so concurrent access to this is
      in fact safe.
      
      What is not thread-safe though is our calculation of offsets
      inside the packfile. Assume two threads calling
      `pack_entry_find_offset` at the same time. We first calculate the
      offset and index location and only then determine if the pack has
      already been opened. If so, we re-calculate the offset and index
      address.
      
      Now the case for two threads: thread 1 first calculates the
      addresses and is subsequently suspended. The second thread will
      now call `pack_index_open` and initialize the pack file,
      calculating its addresses correctly. When the first thread is
      resumed now, he'll see that the pack file has already been
      initialized and will happily proceed with the addresses it has
      already calculated before the check. As the pack file was not
      initialized before, these addresses are bogus.
      
      Fix the issue by only calculating the addresses after having
      checked if the pack file is open.
      Patrick Steinhardt committed
    • Merge pull request #3976 from pks-t/pks/pqueue-null-deref · 19001ca7
      pqueue: resolve possible NULL pointer dereference
      Patrick Steinhardt committed
  2. 01 Nov, 2016 1 commit
  3. 31 Oct, 2016 6 commits
  4. 28 Oct, 2016 4 commits
    • pqueue: resolve possible NULL pointer dereference · 95fa3880
      The `git_pqueue` struct allows being fixed in its total number of
      entries. In this case, we simply throw away items that are
      inserted into the priority queue by examining wether the new item
      to be inserted has a higher priority than the previous smallest
      one.
      
      This feature somewhat contradicts our pqueue implementation in
      that it is allowed to not have a comparison function. In fact, we
      also fail to check if the comparison function is actually set in
      the case where we add a new item into a fully filled fixed-size
      pqueue.
      
      As we cannot determine which item is the smallest item in absence
      of a comparison function, we fix the `NULL` pointer dereference
      by simply dropping all new items which are about to be inserted
      into a full fixed-size pqueue.
      Patrick Steinhardt committed
    • coverity: only analyze the master branch of the main repository · 561276ee
      We used to only execute Coverity analysis on the 'development'
      branch before commit 998f0016 (Refine build limitation,
      2014-01-15), which refined Coverity build limitations. While we
      do not really use the 'development' branch anymore, it does
      still make sense to only analyze a single branch, as otherwise
      Coverity might get confused.
      
      Re-establish the restriction such that we only analyze libgit2's
      'master' branch. Also fix the message announcing why we do not
      actually analyze a certain build.
      Patrick Steinhardt committed
    • Merge pull request #3973 from pks-t/pks/memleak-fixes · e3298a33
      Trivial memory leak fixes in test suite
      Patrick Steinhardt committed
  5. 27 Oct, 2016 2 commits
  6. 16 Oct, 2016 1 commit
  7. 15 Oct, 2016 1 commit
  8. 10 Oct, 2016 16 commits
  9. 09 Oct, 2016 6 commits
  10. 07 Oct, 2016 1 commit