Jim Meyering 9cb18f56fd Don't smash stack when $GIT_ALTERNATE_OBJECT_DIRECTORIES is too long
There is no restriction on the length of the name returned by
get_object_directory, other than the fact that it must be a stat'able
git object directory.  That means its name may have length up to
PATH_MAX-1 (i.e., often 4095) not counting the trailing NUL.

Combine that with the assumption that the concatenation of that name and
suffixes like "/info/alternates" and "/pack/---long-name---.idx" will fit
in a buffer of length PATH_MAX, and you see the problem.  Here's a fix:

    sha1_file.c (prepare_packed_git_one): Lengthen "path" buffer
    so we are guaranteed to be able to append "/pack/" without checking.
    Skip any directory entry that is too long to be appended.
    (read_info_alternates): Protect against a similar buffer overrun.

Before this change, using the following admittedly contrived environment
setting would cause many git commands to clobber their stack and segfault
on a system with PATH_MAX == 4096:

  t=$(perl -e '$s=".git/objects";$n=(4096-6-length($s))/2;print "./"x$n . $s')
  export GIT_ALTERNATE_OBJECT_DIRECTORIES=$t
  touch g
  ./git-update-index --add g

If you run the above commands, you'll soon notice that many
git commands now segfault, so you'll want to do this:

  unset GIT_ALTERNATE_OBJECT_DIRECTORIES

Signed-off-by: Jim Meyering <jim@meyering.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-03 12:25:29 -07:00
2007-02-03 21:49:54 -08:00
2007-05-10 13:26:26 -07:00
2007-04-22 10:44:56 -07:00
2007-05-30 15:03:50 -07:00
2007-05-06 00:21:03 -07:00
2007-02-27 22:15:42 -08:00
2007-04-29 01:52:43 -07:00
2007-03-17 00:34:19 -07:00
2007-05-14 18:50:01 -07:00
2007-04-07 02:26:24 -07:00
2007-03-20 22:17:47 -07:00
2007-02-24 01:42:06 -08:00
2007-04-25 23:31:45 -07:00
2006-05-01 22:29:16 -07:00
2007-05-31 00:09:26 -07:00
2007-06-02 12:00:26 -07:00
2007-04-25 21:39:43 -07:00
2007-03-27 13:00:13 -07:00
2005-10-14 17:17:27 -07:00
2006-05-15 12:32:13 -07:00
2007-04-21 17:21:10 -07:00
2007-04-22 22:16:14 -07:00
2007-05-26 00:33:03 -07:00
2006-02-06 21:43:27 -08:00
2007-02-03 21:49:54 -08:00
2005-09-07 17:45:20 -07:00
2007-04-23 21:39:28 -07:00
2007-05-26 00:33:03 -07:00
2007-07-02 00:35:58 -07:00
2007-05-20 19:57:00 -07:00
2007-05-13 13:34:40 -07:00
2006-09-27 23:59:09 -07:00
2007-03-27 16:57:57 -07:00
2007-03-07 10:47:10 -08:00
2007-03-07 10:47:10 -08:00
2007-05-06 00:21:03 -07:00
2006-06-26 14:58:41 -07:00
2007-04-07 02:29:40 -07:00
2007-03-19 02:48:37 -07:00
2007-04-24 00:08:49 -07:00
2007-04-10 12:48:14 -07:00
2007-03-07 10:47:10 -08:00
2007-02-08 17:48:22 -08:00
2007-04-21 17:21:10 -07:00
2007-07-02 00:35:58 -07:00
2007-06-15 23:48:35 -07:00
2007-03-12 23:40:18 -07:00
2007-03-10 22:07:26 -08:00
2007-04-24 00:08:49 -07:00
2007-05-28 23:54:26 -07:00
2005-11-02 16:50:58 -08:00
2006-03-25 16:35:43 -08:00
2007-05-01 02:59:08 -07:00
2007-05-07 22:02:40 -07:00

////////////////////////////////////////////////////////////////

	GIT - the stupid content tracker

////////////////////////////////////////////////////////////////

"git" can mean anything, depending on your mood.

 - random three-letter combination that is pronounceable, and not
   actually used by any common UNIX command.  The fact that it is a
   mispronunciation of "get" may or may not be relevant.
 - stupid. contemptible and despicable. simple. Take your pick from the
   dictionary of slang.
 - "global information tracker": you're in a good mood, and it actually
   works for you. Angels sing, and a light suddenly fills the room.
 - "goddamn idiotic truckload of sh*t": when it breaks

Git is a fast, scalable, distributed revision control system with an
unusually rich command set that provides both high-level operations
and full access to internals.

Git is an Open Source project covered by the GNU General Public License.
It was originally written by Linus Torvalds with help of a group of
hackers around the net. It is currently maintained by Junio C Hamano.

Please read the file INSTALL for installation instructions.
See Documentation/tutorial.txt to get started, then see
Documentation/everyday.txt for a useful minimum set of commands,
and "man git-commandname" for documentation of each command.
CVS users may also want to read Documentation/cvs-migration.txt.

Many Git online resources are accessible from http://git.or.cz/
including full documentation and Git related tools.

The user discussion and development of Git take place on the Git
mailing list -- everyone is welcome to post bug reports, feature
requests, comments and patches to git@vger.kernel.org. To subscribe
to the list, send an email with just "subscribe git" in the body to
majordomo@vger.kernel.org. The mailing list archives are available at
http://marc.theaimsgroup.com/?l=git and other archival sites.

The messages titled "A note from the maintainer", "What's in
git.git (stable)" and "What's cooking in git.git (topics)" and
the discussion following them on the mailing list give a good
reference for project status, development direction and
remaining tasks.
Description
No description provided
Readme 279 MiB
Languages
C 50.5%
Shell 38.7%
Perl 4.5%
Tcl 3.2%
Python 0.8%
Other 2.1%