summaryrefslogtreecommitdiff
path: root/tests/diff/blob.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2016-06-07 08:35:26 +0200
committerPatrick Steinhardt <ps@pks.im>2016-06-07 09:14:14 +0200
commit13deb8745d6b604a7fc45bb7ddee2a2052e80000 (patch)
tree7a2449d724c89d02fb6f81f4a0bc7da006f8b34f /tests/diff/blob.c
parent7d02019a07840c0263ab935f626af8002af12a91 (diff)
downloadlibgit2-13deb8745d6b604a7fc45bb7ddee2a2052e80000.tar.gz
index: fix NULL pointer access in index_remove_entry
When removing an entry from the index by its position, we first retrieve the position from the index's entries and then try to remove the retrieved value from the index map with `DELETE_IN_MAP`. When `index_remove_entry` returns `NULL` we try to feed it into the `DELETE_IN_MAP` macro, which will unconditionally call `idxentry_hash` and then happily dereference the `NULL` entry pointer. Fix the issue by not passing a `NULL` entry into `DELETE_IN_MAP`.
Diffstat (limited to 'tests/diff/blob.c')
0 files changed, 0 insertions, 0 deletions