OSDN Git Service

Merge branch 'maint'
authorJunio C Hamano <junkio@cox.net>
Fri, 2 Mar 2007 08:31:51 +0000 (00:31 -0800)
committerJunio C Hamano <junkio@cox.net>
Fri, 2 Mar 2007 08:31:51 +0000 (00:31 -0800)
* maint:
  Another memory overrun in http-push.c
  fetch.o depends on the headers, too.
  Documentation: Correct minor typo in git-add documentation.
  Documentation/git-send-email.txt: Fix labeled list formatting
  Documentation/git-quiltimport.txt: Fix labeled list formatting
  Documentation/build-docdep.perl: Fix dependencies for included asciidoc files

1  2 
Makefile
http-push.c

diff --cc Makefile
Simple merge
diff --cc http-push.c
@@@ -2168,9 -2171,10 +2171,10 @@@ static void fetch_symref(const char *pa
                return;
  
        /* If it's a symref, set the refname; otherwise try for a sha1 */
 -      if (!strncmp((char *)buffer.buffer, "ref: ", 5)) {
 +      if (!prefixcmp((char *)buffer.buffer, "ref: ")) {
                *symref = xmalloc(buffer.posn - 5);
-               strlcpy(*symref, (char *)buffer.buffer + 5, buffer.posn - 5);
+               memcpy(*symref, (char *)buffer.buffer + 5, buffer.posn - 6);
+               (*symref)[buffer.posn - 6] = '\0';
        } else {
                get_sha1_hex(buffer.buffer, sha1);
        }