summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-03-30 14:07:18 -0700
committerJunio C Hamano <gitster@pobox.com>2017-03-30 14:07:18 -0700
commite711824c5ec4eb65f5022c75f33a4c5f0b157b65 (patch)
tree644d29b14f42709c75f1da37a5d9fdd4036d4197
parentcd49f9bfb8c23621f618d110f2b95853728be2ba (diff)
parentf2214dede950e506d7637744599ef27b149bbda1 (diff)
downloadgit-e711824c5ec4eb65f5022c75f33a4c5f0b157b65.tar.gz
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
-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 fb2a090a0c..aca9c33d8d 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;
}
}