Check size of path buffer before writing into it
commit3c9d0414ed2db0167e6c828b547be8fc9f88fccc
authorGreg Brockman <gdb@MIT.EDU>
Tue, 20 Jul 2010 04:46:21 +0000 (20 00:46 -0400)
committerJunio C Hamano <gitster@pobox.com>
Tue, 20 Jul 2010 16:17:39 +0000 (20 09:17 -0700)
tree7931e35acd4458bdfa34050aead1209af12dbb24
parentc173dad58787a7f11a526dbcdaa5a2fe9ff1c87f
Check size of path buffer before writing into it

This prevents a buffer overrun that could otherwise be triggered by
creating a file called '.git' with contents

  gitdir: (something really long)

Signed-off-by: Greg Brockman <gdb@mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
setup.c