summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8b1f6de)
raw | patch | inline | side by side (parent: 8b1f6de)
author | Ariel Badichi <abadichi@bezeqint.net> | |
Wed, 23 Apr 2008 01:06:27 +0000 (04:06 +0300) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 23 Apr 2008 04:23:16 +0000 (21:23 -0700) |
Also removed a superfluous test.
Signed-off-by: Ariel Badichi <abadichi@bezeqint.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Ariel Badichi <abadichi@bezeqint.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
archive.c | patch | blob | history |
diff --git a/archive.c b/archive.c
index fb159fe59e9e6fc40db584468c7b1ddf8495ccb3..7a32c19d3ca8043f3ca22dadfdbc60dbbb747d59 100644 (file)
--- a/archive.c
+++ b/archive.c
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;