summaryrefslogtreecommitdiff
path: root/tests/object/blob
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #2334 from libgit2/rb/fix-2333Russell Belfer2014-05-121-3/+10
|\ | | | | Be more careful with user-supplied buffers
| * Be more careful with user-supplied buffersrb/fix-2333Russell Belfer2014-05-081-3/+10
| | | | | | | | | | | | | | | | | | | | | | 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.
* | Add filter options and ALLOW_UNSAFERussell Belfer2014-05-061-1/+1
|/ | | | | | | | | Diff and status do not want core.safecrlf to actually raise an error regardless of the setting, so this extends the filter API with an additional options flags parameter and adds a flag so that filters can be applied with GIT_FILTER_OPT_ALLOW_UNSAFE, indicating that unsafe filter application should be downgraded from a failure to a warning.
* Update git_blob_create_fromchunks callback behavrRussell Belfer2013-12-111-1/+38
| | | | | | | The callback to supply data chunks could return a negative value to stop creation of the blob, but we were neither using GIT_EUSER nor propagating the return value. This makes things use the new behavior of returning the negative value back to the user.
* Rename tests-clar to testsBen Straub2013-11-143-0/+331