diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-03-30 14:07:18 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-03-30 14:07:18 -0700 |
commit | e711824c5ec4eb65f5022c75f33a4c5f0b157b65 (patch) | |
tree | 644d29b14f42709c75f1da37a5d9fdd4036d4197 | |
parent | Merge branch 'mh/notes-tree-consolidate-fix' (diff) | |
parent | builtin/receive-pack: fix incorrect pointer arithmetic (diff) | |
download | tgif-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.c | 2 |
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; } } |