From: Jeff King Date: Mon, 06 Feb 2012 07:45:58 GMT Subject: Re: [RFC/PATCH] tag: add --points-at list option Message-ID: <20120206074558.GA24535@sigill.intra.peff.net> In-Reply-To: <20120206071302.GA10447@sigill.intra.peff.net> On Mon, Feb 06, 2012 at 02:13:02AM -0500, Jeff King wrote: > > BTW, writing that helped me notice two bugs in your patch: > > > > 1. You read up to 47 bytes into the buffer without ever checking > > whether size >= 47. > > > > 2. You never check whether the object you read from read_sha1_file is > > actually a tag. > > Hmm, the "filter->lines" code for "git tag -n" makes a similar error. It > should probably print nothing for objects that are not tags. Ugh, this part of builtin/tag.c is riddled with small bugs. I'm preparing a series that will fix them, and hopefully it should make building your points-at patch on top much more pleasant. -Peff