Skip to content

Commit

Permalink
Merge branch 'maint'
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Junio C Hamano committed Mar 2, 2007
2 parents 112f638 + eecc836 commit 8b969a5
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 20 deletions.
6 changes: 1 addition & 5 deletions Documentation/build-docdep.perl
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@
while (my ($text, $included) = each %include) {
if (! exists $included{$text} &&
(my $base = $text) =~ s/\.txt$//) {
my ($suffix) = '1';
if ($base eq 'git') {
$suffix = '7'; # yuck...
}
print "$base.html $base.$suffix : ", join(" ", keys %$included), "\n";
print "$base.html $base.xml : ", join(" ", keys %$included), "\n";
}
}
2 changes: 1 addition & 1 deletion Documentation/git-add.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ OPTIONS
-f::
Allow adding otherwise ignored files.

\i, \--interactive::
-i, \--interactive::
Add modified contents in the working tree interactively to
the index.

Expand Down
8 changes: 4 additions & 4 deletions Documentation/git-quiltimport.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ OPTIONS
--patches <dir>::
The directory to find the quilt patches and the
quilt series file.

The default for the patch directory is patches
or the value of the $QUILT_PATCHES environment
variable.
+
The default for the patch directory is patches
or the value of the $QUILT_PATCHES environment
variable.

Author
------
Expand Down
12 changes: 6 additions & 6 deletions Documentation/git-send-email.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ The options available are:

--bcc::
Specify a "Bcc:" value for each email.

The --bcc option must be repeated for each user you want on the bcc list.
+
The --bcc option must be repeated for each user you want on the bcc list.

--cc::
Specify a starting "Cc:" value for each email.

The --cc option must be repeated for each user you want on the cc list.
+
The --cc option must be repeated for each user you want on the cc list.

--chain-reply-to, --no-chain-reply-to::
If this is set, each email will be sent as a reply to the previous
Expand Down Expand Up @@ -87,8 +87,8 @@ The options available are:
Specify the primary recipient of the emails generated.
Generally, this will be the upstream maintainer of the
project involved.

The --to option must be repeated for each user you want on the to list.
+
The --to option must be repeated for each user you want on the to list.


Author
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ git-http-push$X: revision.o http.o http-push.o $(GITLIBS)
$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
$(LIBS) $(CURL_LIBCURL) $(EXPAT_LIBEXPAT)

$(LIB_OBJS) $(BUILTIN_OBJS): $(LIB_H)
$(LIB_OBJS) $(BUILTIN_OBJS) fetch.o: $(LIB_H)
$(patsubst git-%$X,%.o,$(PROGRAMS)): $(LIB_H) $(wildcard */*.h)
$(DIFF_OBJS): diffcore.h

Expand Down
10 changes: 7 additions & 3 deletions http-push.c
Original file line number Diff line number Diff line change
Expand Up @@ -1271,7 +1271,9 @@ xml_cdata(void *userData, const XML_Char *s, int len)
struct xml_ctx *ctx = (struct xml_ctx *)userData;
free(ctx->cdata);
ctx->cdata = xmalloc(len + 1);
strlcpy(ctx->cdata, s, len + 1);
/* NB: 's' is not null-terminated, can not use strlcpy here */
memcpy(ctx->cdata, s, len);
ctx->cdata[len] = '\0';
}

static struct remote_lock *lock_remote(const char *path, long timeout)
Expand Down Expand Up @@ -1473,7 +1475,8 @@ static void process_ls_object(struct remote_ls_ctx *ls)
return;
path += 8;
obj_hex = xmalloc(strlen(path));
strlcpy(obj_hex, path, 3);
/* NB: path is not null-terminated, can not use strlcpy here */
memcpy(obj_hex, path, 2);
strcpy(obj_hex + 2, path + 3);
one_remote_object(obj_hex);
free(obj_hex);
Expand Down Expand Up @@ -2170,7 +2173,8 @@ static void fetch_symref(const char *path, char **symref, unsigned char *sha1)
/* If it's a symref, set the refname; otherwise try for a sha1 */
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);
}
Expand Down

0 comments on commit 8b969a5

Please sign in to comment.