summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 21b1ace)
raw | patch | inline | side by side (parent: 21b1ace)
author | Junio C Hamano <junkio@cox.net> | |
Wed, 21 Dec 2005 20:10:10 +0000 (12:10 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 21 Dec 2005 20:13:53 +0000 (12:13 -0800) |
It failed to register the last pack in the objects/info/packs
file. Also it had an independent overrun error.
Signed-off-by: Junio C Hamano <junkio@cox.net>
file. Also it had an independent overrun error.
Signed-off-by: Junio C Hamano <junkio@cox.net>
http-fetch.c | patch | blob | history |
diff --git a/http-fetch.c b/http-fetch.c
index ad59f1cce61d73fa832828aabb880f082debf94d..3cd6ef91af59fdb42a664cb8d9bdb5b591ecb789 100644 (file)
--- a/http-fetch.c
+++ b/http-fetch.c
switch (data[i]) {
case 'P':
i++;
- if (i + 52 < buffer.posn &&
+ if (i + 52 <= buffer.posn &&
!strncmp(data + i, " pack-", 6) &&
!strncmp(data + i + 46, ".pack\n", 6)) {
get_sha1_hex(data + i + 6, sha1);
break;
}
default:
- while (data[i] != '\n')
+ while (i < buffer.posn && data[i] != '\n')
i++;
}
i++;