~ubuntu-branches/ubuntu/intrepid/git-core/intrepid-security

« back to all changes in this revision

Viewing changes to mktag.c

  • Committer: Package Import Robot
  • Author(s): Gerrit Pape
  • Date: 2007-10-04 08:27:01 UTC
  • mfrom: (1.1.23)
  • Revision ID: package-import@ubuntu.com-20071004082701-rsd058ontoqz4i30
Tags: 1:1.5.3.4-1
new upstream point release (closes: #445188).

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
 * The first three lines are guaranteed to be at least 63 bytes:
12
12
 * "object <sha1>\n" is 48 bytes, "type tag\n" at 9 bytes is the
13
13
 * shortest possible type-line, and "tag .\n" at 6 bytes is the
14
 
 * shortest single-character-tag line. 
15
 
 *
16
 
 * We also artificially limit the size of the full object to 8kB.
17
 
 * Just because I'm a lazy bastard, and if you can't fit a signature
18
 
 * in that size, you're doing something wrong.
 
14
 * shortest single-character-tag line.
19
15
 */
20
16
 
21
 
/* Some random size */
22
 
#define MAXSIZE (8192)
23
 
 
24
17
/*
25
18
 * We refuse to tag something we can't verify. Just because.
26
19
 */
127
120
 
128
121
        setup_git_directory();
129
122
 
130
 
        if (read_pipe(0, &buffer, &size)) {
 
123
        if (read_fd(0, &buffer, &size)) {
131
124
                free(buffer);
132
125
                die("could not read from stdin");
133
126
        }