summaryrefslogtreecommitdiff
path: root/archive.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2008-04-22 23:37:06 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2008-04-22 23:37:06 -0700
commitd6958a1a32814af69a7571daa45252018c61f969 (patch)
tree355fe5cdd4749e67d8979f80f7dcdc649b9aba41 /archive.c
parentAmend git-push refspec documentation (diff)
parentsvn-git: Use binmode for reading/writing binary rev maps (diff)
downloadtgif-d6958a1a32814af69a7571daa45252018c61f969.tar.xz
Merge branch 'maint-1.5.4' into maint
* maint-1.5.4: svn-git: Use binmode for reading/writing binary rev maps diff options documentation: refer to --diff-filter in --name-status git-svn bug with blank commits and author file archive.c: format_subst - fixed bogus argument to memchr copy.c: copy_fd - correctly report write errors gitattributes: Fix subdirectory attributes specified from root directory
Diffstat (limited to 'archive.c')
-rw-r--r--archive.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/archive.c b/archive.c
index fb159fe59e..7a32c19d3c 100644
--- a/archive.c
+++ b/archive.c
@@ -16,9 +16,9 @@ static void format_subst(const struct commit *commit,
const char *b, *c;
b = memmem(src, len, "$Format:", 8);
- if (!b || src + len < b + 9)
+ if (!b)
break;
- c = memchr(b + 8, '$', len - 8);
+ c = memchr(b + 8, '$', (src + len) - b - 8);
if (!c)
break;