On Wed, Aug 09, 2006 at 10:43:57PM -0700, Junio C Hamano wrote: > Junio C Hamano <junkio@xxxxxxx> writes: > > > Willy Tarreau <w@xxxxxx> writes: > > > >> I encountered a problem in 1.4.1 and 1.4-git about 2 weeks ago > >> (I've not tried 1.4.2-rc4 yet). When applying a git patch which > >> contains a symlink, the symlink created on the filesystem sometimes > >> has a wrong name with some chars appended to its end. > > > > Thanks. I can reproduce this, and am looking into it. > > Found it. The patch application mechanism uses a counted string > (char *buf with ulong size) to hold the result, and the code > stupidly threw the buf to symlink(2), without making it NUL > terminated. Excellent ! That means that under some circumstances, it might even have corrupted the very first link, and not necessarily only the second and other ones. Thanks for having fixed it that fast. Cheers, Willy - : send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html