Hi, On Mon, May 22, 2006 at 06:02:39PM -0700, Junio C Hamano wrote: > Sean <seanlkml@xxxxxxxxxxxx> writes: [...] > > - name = xmalloc(len_a + len_b - pfx_length - sfx_length + 7); > > + name = xmalloc(pfx_length + a_midlen + b_midlen + sfx_length + 7); > > sprintf(name, "%.*s{%.*s => %.*s}%s", > > Obviously correct given what the sprintf() that immediately > follows does. Sheesh, what was I smoking back then. *BLUSH* What about introducing xasprintf() to eliminate such issues? -- ldv
Attachment:
pgpvxqpZ09ZQY.pgp
Description: PGP signature