summaryrefslogtreecommitdiff
path: root/http-fetch.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <junkio@cox.net>2005-12-21 14:00:47 -0800
committerLibravatar Junio C Hamano <junkio@cox.net>2005-12-21 14:00:47 -0800
commit2a212746f44f18695d33931039da10f842de7b25 (patch)
tree73e3445f380222ecb9d86290ec1118671a866c28 /http-fetch.c
parentPost 1.0.0 development track. (diff)
parentserver-info: skip empty lines. (diff)
downloadtgif-2a212746f44f18695d33931039da10f842de7b25.tar.xz
Merge branch 'fixes'
Diffstat (limited to 'http-fetch.c')
-rw-r--r--http-fetch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/http-fetch.c b/http-fetch.c
index ad59f1cce6..3cd6ef91af 100644
--- a/http-fetch.c
+++ b/http-fetch.c
@@ -658,7 +658,7 @@ static int fetch_indices(struct alt_base *repo)
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);
@@ -667,7 +667,7 @@ static int fetch_indices(struct alt_base *repo)
break;
}
default:
- while (data[i] != '\n')
+ while (i < buffer.posn && data[i] != '\n')
i++;
}
i++;