Fix buffer overflow in git-grep
authorDmitry Potapov <dpotapov@gmail.com>
Wed, 16 Jul 2008 15:33:29 +0000 (19:33 +0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 16 Jul 2008 20:30:34 +0000 (13:30 -0700)
commit620e2bb93785ed8eb60846d94fd4753d4817c8ec
treec7c2c34dc1d9ec69fd233fe6e8a53934cf18d154
parentdf4b3abc941a0f876c3b1f5490e6ea01a4fb62cf
Fix buffer overflow in git-grep

If PATH_MAX on your system is smaller than any path stored in the git
repository, that can cause memory corruption inside of the grep_tree
function used by git-grep.

Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-grep.c