]> git.ipfire.org Git - thirdparty/git.git/commit
tree-diff: don't access hash of NULL object_id pointer
authorRené Scharfe <l.s.r@web.de>
Sat, 15 Jul 2017 17:18:51 +0000 (19:18 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 17 Jul 2017 21:49:36 +0000 (14:49 -0700)
commitfb04dced9c6510176f06953d2cd6a239703401f1
treef76301d811e1c428a8a84336184441edda5fc9f9
parent94e327e973d320abf91c22307b87292911643c3b
tree-diff: don't access hash of NULL object_id pointer

The object_id pointers can be NULL for invalid entries.  Don't try to
dereference them and pass NULL along to fill_tree_descriptor() instead,
which handles them just fine.

Found with Clang's UBSan.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
tree-diff.c