• Show log

    Commit

  • Hash : 1e4976cb
    Author : Russell Belfer
    Date : 2014-05-08T10:17:14

    Be more careful with user-supplied buffers
    
    This adds in missing calls to `git_buf_sanitize` and fixes a
    number of places where `git_buf` APIs could inadvertently write
    NUL terminator bytes into invalid buffers.  This also changes the
    behavior of `git_buf_sanitize` to NUL terminate a buffer if it can
    and of `git_buf_shorten` to do nothing if it can.
    
    Adds tests of filtering code with zeroed (i.e. unsanitized) buffer
    which was previously triggering a segfault.
    

  • 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.