Re: [PATCH] strbuf_getwholeline: NUL-terminate getdelim buffer on error
- From
Jeff King <peff@peff.net>
- Date
- Mar 5, 2016, 19:36 UTC
- Message-ID
- <20160305193640.GA20701@sigill.intra.peff.net>
- In-Reply-To
- <xmqqziucu3d7.fsf@gitster.mtv.corp.google.com>
On Sat, Mar 05, 2016 at 11:33:08AM -0800, Junio C Hamano wrote:
Show 8 quoted lines
> Jeff King <peff@peff.net> writes: > > > Not a big rush for 2.8.0-rc, as the bug is in v2.5.0, and I doubt > > there's an easy trigger besides fast-import. But it might be harmless > > enough to squeeze in. > > Was it found by a real-world debugging session, or by a code > inspection? I'd be really impressed if it were the latter ;-)
Sorry to disappoint, but it was the former. :)
I found (and am fixing) a _different_ bug with:
{
echo "tag foo"
echo "from HEAD:./bar"
} | git fast-importand I wondered if fast-import would take:
echo "tag foo from HEAD:./bar"
on one line. The answer is no, btw, but it also tickles this bug (it is expecting "from ..." on the next line, and handles EOF by detecting the empty string).
-Peff