Skip to content

Commit e711824

Browse files
committed
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
2 parents cd49f9b + f2214de commit e711824

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builtin/receive-pack.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1524,7 +1524,7 @@ static void queue_commands_from_cert(struct command **tail,
15241524

15251525
while (boc < eoc) {
15261526
const char *eol = memchr(boc, '\n', eoc - boc);
1527-
tail = queue_command(tail, boc, eol ? eol - boc : eoc - eol);
1527+
tail = queue_command(tail, boc, eol ? eol - boc : eoc - boc);
15281528
boc = eol ? eol + 1 : eoc;
15291529
}
15301530
}

0 commit comments

Comments
 (0)