From: "Shawn O. Pearce" <spearce@spearce.org>
To: Nicolas Pitre <nico@fluxnic.net>, Junio C Hamano <gitster@pobox.com>
Cc: Andy Isaacson <adi@hexapodia.org>, git@vger.kernel.org
Subject: Re: git hang with corrupted .pack
Date: Wed, 14 Oct 2009 11:03:02 -0700 [thread overview]
Message-ID: <20091014180302.GL9261@spearce.org> (raw)
In-Reply-To: <alpine.LFD.2.00.0910141234540.20122@xanadu.home>
> Nicolas Pitre <nico@fluxnic.net> wrote:
> ...
> > This is unfortunate that making a test case for this isn't exactly
> > trivial.
Junio, can you please squash this in?
diff --git a/t/t5303-pack-corruption-resilience.sh b/t/t5303-pack-corruption-resilience.sh
index 5132d41..5f6cd4f 100755
--- a/t/t5303-pack-corruption-resilience.sh
+++ b/t/t5303-pack-corruption-resilience.sh
@@ -275,4 +275,13 @@ test_expect_success \
git cat-file blob $blob_2 > /dev/null &&
git cat-file blob $blob_3 > /dev/null'
+test_expect_success \
+ 'corrupting header to have too small output buffer fails unpack' \
+ 'create_new_pack &&
+ git prune-packed &&
+ printf "\262\001" | do_corrupt_object $blob_1 0 &&
+ test_must_fail git cat-file blob $blob_1 > /dev/null &&
+ test_must_fail git cat-file blob $blob_2 > /dev/null &&
+ test_must_fail git cat-file blob $blob_3 > /dev/null'
+
test_done
--
Shawn.
next prev parent reply other threads:[~2009-10-14 18:11 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-14 4:22 git hang with corrupted .pack Andy Isaacson
2009-10-14 14:23 ` Shawn O. Pearce
2009-10-14 16:09 ` Nicolas Pitre
2009-10-14 16:12 ` Shawn O. Pearce
2009-10-14 16:42 ` Nicolas Pitre
2009-10-14 18:03 ` Shawn O. Pearce [this message]
2009-10-14 18:39 ` Nicolas Pitre
2009-10-15 7:39 ` Junio C Hamano
2009-10-20 15:14 ` Alex Riesen
2009-10-20 15:23 ` Sverre Rabbelier
2009-10-20 15:36 ` Alex Riesen
2009-10-26 2:35 ` Junio C Hamano
2009-10-26 7:07 ` Alex Riesen
2009-10-26 14:23 ` Shawn O. Pearce
2009-11-03 21:31 ` Pascal Obry
2009-11-03 22:28 ` Shawn O. Pearce
2009-11-03 22:34 ` Pascal Obry
2009-10-20 16:52 ` Junio C Hamano
2009-10-20 17:13 ` Junio C Hamano
2009-10-20 19:33 ` Junio C Hamano
2009-10-20 19:46 ` Nicolas Pitre
2009-10-20 20:50 ` Junio C Hamano
2009-10-22 6:06 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091014180302.GL9261@spearce.org \
--to=spearce@spearce.org \
--cc=adi@hexapodia.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=nico@fluxnic.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).