summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* THREADING: OpenSSL 1.1 is thead-safe, rework some paragraphscmn/threading-updateCarlos Martín Nieto2016-11-041-22/+24
|
* THREADING: update cURL thread safety linkCarlos Martín Nieto2016-11-021-1/+1
|
* Merge pull request #3960 from ignatenkobrain/openssl-1.1.0Carlos Martín Nieto2016-11-022-25/+150
|\ | | | | add support for OpenSSL 1.1.0 for BIO filter
| * openssl: include OpenSSL headers only when we're buliding against itCarlos Martín Nieto2016-11-021-6/+10
| | | | | | | | | | | | We need to include the initialisation and construction functions in all backend, so we include this header when building against SecureTransport and WinHTTP as well.
| * openssl: use ASN1_STRING_get0_data when compiling against 1.1Carlos Martín Nieto2016-11-022-2/+7
| | | | | | | | For older versions we can fall back on the deprecated ASN1_STRING_data.
| * openssl: recreate the OpenSSL 1.1 BIO interface for older versionsCarlos Martín Nieto2016-11-022-55/+134
| | | | | | | | | | We want to program against the interface, so recreate it when we compile against pre-1.1 versions.
| * add support for OpenSSL 1.1.0 for BIO filterIgor Gnatenko2016-10-121-0/+37
| | | | | | | | | | Closes: https://github.com/libgit2/libgit2/issues/3959 Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* | Merge pull request #3984 from pks-t/pks/pack-find-offset-raceCarlos Martín Nieto2016-11-021-5/+5
|\ \ | | | | | | pack: fix race in pack_entry_find_offset
| * | pack: fix race in pack_entry_find_offsetPatrick Steinhardt2016-11-021-5/+5
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge pull request #3976 from pks-t/pks/pqueue-null-derefPatrick Steinhardt2016-11-022-2/+25
|\ \ | | | | | | pqueue: resolve possible NULL pointer dereference
| * | pqueue: resolve possible NULL pointer dereferencePatrick Steinhardt2016-10-282-2/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge pull request #3975 from pks-t/pks/ci-improvementsCarlos Martín Nieto2016-11-012-11/+7
|\ \ \ | | | | | | | | CI Improvements
| * | | travis: do not allow valgrind failuresPatrick Steinhardt2016-10-311-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our valgrind jobs haven't been failing for several builds by now. This indicates that our tests are sufficiently stable when running under valgrind. As such, any failures reported by valgrind become interesting to us and shouldn't be ignored when causing a build to fail. Remove the valgrind job from the list of allowed failures.
| * | | coverity: check for Coverity token only if necessaryPatrick Steinhardt2016-10-311-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When running a Coverity build, we have to provide an authentication token in order to proof that we are actually allowed to run analysis in the name of a certain project. As this token should be secret, it is only set on the main repository, so when we were requested to run the Coverity script on another repository we do error out. But in fact we do also error out if the Coverity analysis should _not_ be run if there is no authentication token provided. Fix the issue by only checking for the authentication token after determining if analysis is indeed requested.
| * | | coverity: only analyze the master branch of the main repositoryPatrick Steinhardt2016-10-281-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We used to only execute Coverity analysis on the 'development' branch before commit 998f001 (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.
| * | | coverity: fix download URLPatrick Steinhardt2016-10-281-2/+1
| |/ /
* | | Merge pull request #3978 from pks-t/pks/doc-improvementsEdward Thomson2016-10-313-7/+7
|\ \ \ | |/ / |/| | Small documentation improvements
| * | openssl_stream: fix typoPatrick Steinhardt2016-10-311-1/+1
| | |
| * | PROJECTS: consistently quote directoriesPatrick Steinhardt2016-10-311-3/+3
| | |
| * | Documentation: fix small typosPatrick Steinhardt2016-10-312-3/+3
|/ /
* | Merge pull request #3973 from pks-t/pks/memleak-fixesPatrick Steinhardt2016-10-282-0/+4
|\ \ | | | | | | Trivial memory leak fixes in test suite
| * | tests: fetchhead: fix memory leakPatrick Steinhardt2016-10-271-0/+2
| | |
| * | tests: vector: fix memory leakPatrick Steinhardt2016-10-271-0/+2
|/ /
* | Merge pull request #3966 from vivaladav/documentation-fixesCarlos Martín Nieto2016-10-161-1/+1
|\ \ | |/ |/| patch: minor documentation fix.
| * patch: minor documentation fix.Davide Coppola2016-10-161-1/+1
|/ | | | Fix @return description of git_patch_num_lines_in_hunk.
* Merge pull request #3897 from pks-t/pks/squelch-example-warningsPatrick Steinhardt2016-10-107-508/+720
|\ | | | | Squelch example warnings, enable CI
| * script: cibuild: build examplesPatrick Steinhardt2016-10-101-1/+1
| |
| * examples: add: fix type casting warningPatrick Steinhardt2016-10-101-5/+4
| |
| * examples: diff: parse correct types for line-diffoptsPatrick Steinhardt2016-10-103-3/+31
| |
| * examples: fix warnings in network/fetch.cPatrick Steinhardt2016-10-101-7/+7
| |
| * examples: general: fix remaining warningsPatrick Steinhardt2016-10-101-9/+14
| |
| * examples: general: convert C99 comments to C90 commentsPatrick Steinhardt2016-10-101-42/+54
| |
| * examples: general: extract function demonstrating OID parsingPatrick Steinhardt2016-10-101-26/+44
| |
| * examples: general: extract function demonstrating ODBPatrick Steinhardt2016-10-101-51/+77
| |
| * examples: general: extract function demonstrating commit writingPatrick Steinhardt2016-10-101-36/+51
| |
| * examples: general: extract functions demonstrating object parsingPatrick Steinhardt2016-10-101-131/+194
| |
| * examples: general: extract function demonstrating revwalkingPatrick Steinhardt2016-10-101-39/+53
| |
| * examples: general: extract function demonstrating index walkingPatrick Steinhardt2016-10-101-24/+33
| |
| * examples: general: extract function demonstrating reference listingsPatrick Steinhardt2016-10-101-22/+36
| |
| * examples: general: extract function demonstrating config filesPatrick Steinhardt2016-10-101-14/+23
| |
| * examples: general: use tabs instead of spacesPatrick Steinhardt2016-10-101-457/+457
|/
* Merge branch 'pr/3809'Edward Thomson2016-10-0912-13/+58
|\
| * make git_diff_stats_to_buf not show 0 insertions or 0 deletionsSim Domingo2016-10-0912-13/+58
| |
* | Merge pull request #3958 from libgit2/ethomson/settings_docsEdward Thomson2016-10-091-1/+2
|\ \ | | | | | | docs: GIT_OPT_ENABLE_STRICT_OBJECT_CREATION is enabled
| * | docs: GIT_OPT_ENABLE_STRICT_OBJECT_CREATION is enabledethomson/settings_docsEdward Thomson2016-10-091-1/+2
| | | | | | | | | | | | | | | We changed the defaults on strict object creation - it is enabled by default. Update the documentation to reflect that.
* | | Merge pull request #3956 from pks-t/pks/object-parsing-hardeningEdward Thomson2016-10-092-4/+10
|\ \ \ | |/ / |/| | Object parsing hardening
| * | commit: always initialize commit messagePatrick Steinhardt2016-10-091-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When parsing a commit, we will treat all bytes left after parsing the headers as the commit message. When no bytes are left, we leave the commit's message uninitialized. While uncommon to have a commit without message, this is the right behavior as Git unfortunately allows for empty commit messages. Given that this scenario is so uncommon, most programs acting on the commit message will never check if the message is actually set, which may lead to errors. To work around the error and not lay the burden of checking for empty commit messages to the developer, initialize the commit message with an empty string when no commit message is given.
| * | tree: validate filename and OID length when parsing objectPatrick Steinhardt2016-10-071-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | When parsing tree entries from raw object data, we do not verify that the tree entry actually has a filename as well as a valid object ID. Fix this by asserting that the filename length is non-zero as well as asserting that there are at least `GIT_OID_RAWSZ` bytes left when parsing the OID.
* | | Merge pull request #3955 from arthurschreiber/arthur/fix-regcomp_l-checkCarlos Martín Nieto2016-10-072-8/+30
|\ \ \ | | | | | | | | Fix the existence check for `regcomp_l`.
| * | | Fix the existence check for `regcomp_l`.Arthur Schreiber2016-10-072-8/+30
|/ / / | | | | | | | | | | | | | | | | | | `xlocale.h` only defines `regcomp_l` if `regex.h` was included as well. Also change the test cases to actually test `p_regcomp` works with a multibyte locale.