diff options
author | Ariel Badichi <abadichi@bezeqint.net> | 2008-04-23 04:06:27 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-04-22 21:23:16 -0700 |
commit | 75b7dfbdc030cfc6f09a6317444c36c4957a9133 (patch) | |
tree | 6f136ef87cf2fa585e96d610586d2ceea7ac88b4 | |
parent | 8b1f6de854ae95eb3f4225a71aad29ca086cfd2e (diff) | |
download | git-75b7dfbdc030cfc6f09a6317444c36c4957a9133.tar.gz |
archive.c: format_subst - fixed bogus argument to memchr
Also removed a superfluous test.
Signed-off-by: Ariel Badichi <abadichi@bezeqint.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r-- | archive.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |