summaryrefslogtreecommitdiff
path: root/builtin/receive-pack.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-03-30 21:07:18 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-03-30 21:07:18 (GMT)
commite711824c5ec4eb65f5022c75f33a4c5f0b157b65 (patch)
tree644d29b14f42709c75f1da37a5d9fdd4036d4197 /builtin/receive-pack.c
parentcd49f9bfb8c23621f618d110f2b95853728be2ba (diff)
parentf2214dede950e506d7637744599ef27b149bbda1 (diff)
downloadgit-e711824c5ec4eb65f5022c75f33a4c5f0b157b65.zip
git-e711824c5ec4eb65f5022c75f33a4c5f0b157b65.tar.gz
git-e711824c5ec4eb65f5022c75f33a4c5f0b157b65.tar.bz2
Merge branch 'bc/push-cert-receive-fix'
"git receive-pack" could have been forced to die by attempting allocate an unreasonably large amount of memory with a crafted push certificate; this has been fixed. * bc/push-cert-receive-fix: builtin/receive-pack: fix incorrect pointer arithmetic
Diffstat (limited to 'builtin/receive-pack.c')
-rw-r--r--builtin/receive-pack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index fb2a090..aca9c33 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -1524,7 +1524,7 @@ static void queue_commands_from_cert(struct command **tail,
while (boc < eoc) {
const char *eol = memchr(boc, '\n', eoc - boc);
- tail = queue_command(tail, boc, eol ? eol - boc : eoc - eol);
+ tail = queue_command(tail, boc, eol ? eol - boc : eoc - boc);
boc = eol ? eol + 1 : eoc;
}
}