On Fri, Oct 05, 2007 at 08:30:45AM +0000, Johannes Schindelin wrote: > Hi, > > On Fri, 5 Oct 2007, Pierre Habouzit wrote: > > > When crlf_to_git or ident_to_git are called "in place", the buffer > > already is big enough and should not be resized (as it could make the > > buffer address change, hence invalidate the `src' pointers !). > > I wonder why we resize at all if the buffer is big enough to begin with. strbuf_grow takes care of that itself but indeed you make me see that my patch is wrong. if buf->len > len then len - buf->len is err a bit big. I'll roll better ones. -- ·O· Pierre Habouzit ··O madcoder@xxxxxxxxxx OOO http://www.madism.org
Attachment:
pgppVdhgVTwwy.pgp
Description: PGP signature