* [PATCH] git-rev-list: avoid crash on broken repository
@ 2005-08-19 18:28 Sergey Vlasov
2005-08-19 21:30 ` Junio C Hamano
0 siblings, 1 reply; 2+ messages in thread
From: Sergey Vlasov @ 2005-08-19 18:28 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
[-- Attachment #1: Type: text/plain, Size: 650 bytes --]
When following tags, check for parse_object() success and error out
properly instead of segfaulting.
Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
---
rev-list.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
f4ec41063d2f43b06b7c8e511108b4c9bf9e6ebe
diff --git a/rev-list.c b/rev-list.c
--- a/rev-list.c
+++ b/rev-list.c
@@ -418,6 +418,8 @@ static struct commit *get_commit_referen
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));
}
/*
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] git-rev-list: avoid crash on broken repository
2005-08-19 18:28 [PATCH] git-rev-list: avoid crash on broken repository Sergey Vlasov
@ 2005-08-19 21:30 ` Junio C Hamano
0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2005-08-19 21:30 UTC (permalink / raw)
To: Sergey Vlasov; +Cc: git
I humbly appreciate your patch, sir. I am really sorry to be in
the position of having to tell you this, but earlier the Emperor
Penguin himself gave me this shiny blue baseball bat and told me
to show it to any deserving person. Could you please come
closer and kindly extend your neck a little bit more, so I can
swing it well at your head...
Subject: Re: [PATCH] Teach applymbox to keep the Subject: line.
Date: Wed, 17 Aug 2005 13:42:57 -0700
Message-ID: <7vfyt8thv2.fsf@assigned-by-dhcp.cox.net>
Linus Torvalds <torvalds@osdl.org> writes:
> ...
> Ergo: if somebody sends you mime-encoded patches, hit them
> with a baseball bat (politely) and teach them not to do
> that...
I agree with you in principle and that is why I always run
applymbox with the -q flag. Maybe I should start trying the
baseball bat approach to see what happens.
;-)
Anyway, I have merged your fix and pushed it out. Thanks for
the patch.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-08-19 21:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-19 18:28 [PATCH] git-rev-list: avoid crash on broken repository Sergey Vlasov
2005-08-19 21:30 ` Junio C Hamano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).