summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bb9e15a)
raw | patch | inline | side by side (parent: bb9e15a)
author | Andre Noll <maan@systemlinux.org> | |
Wed, 21 Jun 2006 02:46:05 +0000 (04:46 +0200) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 21 Jun 2006 10:56:00 +0000 (03:56 -0700) |
Currently, we don't check refs_hash_size size and happily call
lookup_object_refs() even if refs_hash_size is zero which leads to
a division by zero in hash_obj().
Signed-off-by: Andre Noll <maan@systemlinux.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
lookup_object_refs() even if refs_hash_size is zero which leads to
a division by zero in hash_obj().
Signed-off-by: Andre Noll <maan@systemlinux.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
object-refs.c | patch | blob | history |
diff --git a/object-refs.c b/object-refs.c
index 8afa2276fbe9e79bba700b99b1ef345bb6d7f5e8..a7d49c60d7176fbc90635e07dc2ce658125edafc 100644 (file)
--- a/object-refs.c
+++ b/object-refs.c
if (!track_object_refs)
die("cannot do reachability with object refs turned off");
+ /* nothing to lookup */
+ if (!refs_hash_size)
+ return;
/* If we've been here already, don't bother */
if (obj->flags & mask)
return;