From: Jeff King Date: Sat, 05 Mar 2016 19:36:41 GMT Subject: Re: [PATCH] strbuf_getwholeline: NUL-terminate getdelim buffer on error Message-ID: <20160305193640.GA20701@sigill.intra.peff.net> In-Reply-To: On Sat, Mar 05, 2016 at 11:33:08AM -0800, Junio C Hamano wrote: > Jeff King 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-import and 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