@matheusbsbs / matheus-bagliano / commits / 4ad1eada97
Fork 0

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>

Shawn O. Pearce committed Sep 14, 2007 at 03:31 UTC 4ad1eada9774a1f340beb4fdf78f1735534741bb
1 file changed +1 -1
builtin-fetch.c
+1 -1
@@ -503,7 +503,7 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
503 rla_offset = strlen(default_rla);
504 for (j = 1; j < argc; j++) {
505 sprintf(default_rla + rla_offset, " %s", argv[j]);
506 - rla_offset += strlen(argv[j]);
506 + rla_offset += strlen(argv[j]) + 1;
507 }
508
509 if (i == argc)