Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'bc/push-cert-receive-fix'
author
Junio C Hamano
<gitster@pobox.com>
Thu, 30 Mar 2017 21:07:18 +0000
(14:07 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Thu, 30 Mar 2017 21:07:18 +0000
(14:07 -0700)
"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
builtin/receive-pack.c
patch
|
blob
|
history
raw
(from parent 1:
cd49f9b
)
diff --git
a/builtin/receive-pack.c
b/builtin/receive-pack.c
index fb2a090a0ce464cf6f663fa367c4859bd3a5f619..aca9c33d8d867d7e507f10e2eae5617b23956cdf 100644
(file)
--- 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;
}
}