Re: [PATCH] archive-tar: fix sanity check in config parsing

2013-01-14 Thread Joachim Schmitz
Jeff King wrote: On Sun, Jan 13, 2013 at 06:42:01PM +0100, René Scharfe wrote: When parsing these config variable names, we currently check that the second dot is found nine characters into the name, disallowing filter names with a length of five characters. Additionally, git archive crashes

Re: [PATCH] archive-tar: fix sanity check in config parsing

2013-01-14 Thread Jeff King
On Mon, Jan 14, 2013 at 09:17:57AM +0100, Joachim Schmitz wrote: For the curious, the original version of the patch[1] read: + if (prefixcmp(var, tarfilter.)) + return 0; + dot = strrchr(var, '.'); + if (dot == var + 9) + return 0; and when

Re: [PATCH] archive-tar: fix sanity check in config parsing

2013-01-14 Thread Jeff King
On Mon, Jan 14, 2013 at 04:44:24AM -0800, Jeff King wrote: Wouldn't it then be better ti use strlen(tar) rather than a 3? Or at least a comment? [...] We could also potentially encapsulate it in a function. I think the diff code has a very similar block. Here's a series that does that,

Re: [PATCH] archive-tar: fix sanity check in config parsing

2013-01-13 Thread Jeff King
On Sun, Jan 13, 2013 at 06:42:01PM +0100, René Scharfe wrote: When parsing these config variable names, we currently check that the second dot is found nine characters into the name, disallowing filter names with a length of five characters. Additionally, git archive crashes when the second