Re: [PATCH 2/7] revert: Fix buffer overflow in insn sheet parser
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Aug 14, 2011, 11:58 UTC
- Message-ID
- <20110814115821.GC18466@elie.gateway.2wire.net>
- In-Reply-To
- <1313310789-10216-3-git-send-email-artagnon@gmail.com>
Hi,
Ramkumar Ramachandra wrote:
Show 13 quoted lines
> --- a/t/t3510-cherry-pick-sequence.sh > +++ b/t/t3510-cherry-pick-sequence.sh > @@ -211,4 +211,15 @@ test_expect_success 'malformed instruction sheet 2' ' > test_must_fail git cherry-pick --continue > ' > > +test_expect_success 'malformed instruction sheet 3' ' > + pristine_detach initial && > + test_must_fail git cherry-pick base..anotherpick && > + echo "resolved" >foo && > + git add foo && > + git commit && > + sed "s/pick \([0-9a-f]\+\)\(.*\)/pick \1\1\1\1\1\1\1\1\2/" .git/sequencer/todo >new_sheet &&
This construct (\+ in sed regexes) is not portable. See the note on grep in Documentation/CodingGuidelines (maybe it should be tweaked to say "grep and sed").