diff options
author | Russell Belfer <rb@github.com> | 2013-06-19 15:54:19 -0700 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2013-06-19 15:54:19 -0700 |
commit | 7863523a1be51981bafee9d13b3344fb4ff47347 (patch) | |
tree | ff0f851b89ad1e0a72a980f402d0cac0c4d028a6 /tests-clar/diff/patch.c | |
parent | f30fff45a752cb0781067ad48c283e49345a5813 (diff) | |
download | libgit2-7863523a1be51981bafee9d13b3344fb4ff47347.tar.gz |
Add tests and fix use of freed memory
This adds some tests for updating the index and having it remove
items to make sure that the iteration over the index still works
even as earlier items are removed.
In testing with valgrind, this found a path that would use the
path string from the index entry after it had been freed. The
bug fix is simply to copy the path of the index entry before
doing any actual index manipulation.
Diffstat (limited to 'tests-clar/diff/patch.c')
0 files changed, 0 insertions, 0 deletions