1
0
mirror of https://github.com/git/git.git synced 2024-09-28 08:49:45 +02:00

Fix off by one bug in reflog messages written by builtin-fetch

We are adding a space between each argument in the sprintf above
so we must account for this as we update our position within the
reflog message and append in any remaining arguments.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Shawn O. Pearce 2007-09-14 03:31:09 -04:00 committed by Junio C Hamano
parent 1aad91f5a7
commit 4ad1eada97

View File

@ -503,7 +503,7 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
rla_offset = strlen(default_rla);
for (j = 1; j < argc; j++) {
sprintf(default_rla + rla_offset, " %s", argv[j]);
rla_offset += strlen(argv[j]);
rla_offset += strlen(argv[j]) + 1;
}
if (i == argc)