projects
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cc5625a
)
[PATCH] git-rev-list: avoid crash on broken repository
author
Sergey Vlasov
<vsu@altlinux.ru>
Fri, 19 Aug 2005 18:28:35 +0000
(22:28 +0400)
committer
Junio C Hamano
<junkio@cox.net>
Fri, 19 Aug 2005 20:07:43 +0000
(13:07 -0700)
When following tags, check for parse_object() success and error out
properly instead of segfaulting.
Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
Signed-off-by: Junio C Hamano <junkio@cox.net>
rev-list.c
patch
|
blob
|
history
diff --git
a/rev-list.c
b/rev-list.c
index
ce5b8b2
..
2ed5e87
100644
(file)
--- a/
rev-list.c
+++ b/
rev-list.c
@@
-418,6
+418,8
@@
static struct commit *get_commit_reference(const char *name, unsigned int flags)
if (tag_objects && !(object->flags & UNINTERESTING))
add_pending_object(object, tag->tag);
object = parse_object(tag->tagged->sha1);
+ if (!object)
+ die("bad object %s", sha1_to_hex(tag->tagged->sha1));
}
/*