summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2017-03-30 14:07:18 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-03-30 14:07:18 -0700
commite711824c5ec4eb65f5022c75f33a4c5f0b157b65 (patch)
tree644d29b14f42709c75f1da37a5d9fdd4036d4197
parentMerge branch 'mh/notes-tree-consolidate-fix' (diff)
parentbuiltin/receive-pack: fix incorrect pointer arithmetic (diff)
downloadtgif-e711824c5ec4eb65f5022c75f33a4c5f0b157b65.tar.xz
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;
}
}