• Show log

    Commit

  • Hash : 95fa3880
    Author : Patrick Steinhardt
    Date : 2016-10-28T16:07:40

    pqueue: resolve possible NULL pointer dereference
    
    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.
    

  • README.md

  • Writing Clar tests for libgit2

    For information on the Clar testing framework and a detailed introduction please visit:

    https://github.com/vmg/clar

    • Write your modules and tests. Use good, meaningful names.

    • Make sure you actually build the tests by setting:

        cmake -DBUILD_CLAR=ON build/
    • Test:

        ./build/libgit2_clar
    • Make sure everything is fine.

    • Send your pull request. That’s it.