receive-pack: do not overallocate command structure
authorJunio C Hamano <gitster@pobox.com>
Fri, 15 Aug 2014 20:53:46 +0000 (13:53 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 15 Sep 2014 20:23:18 +0000 (13:23 -0700)
An "update" command in the protocol exchange consists of 40-hex old
object name, SP, 40-hex new object name, SP, and a refname, but the
first instance is further followed by a NUL with feature requests.

The command structure, which has a flex-array member that stores the
refname at the end, was allocated based on the whole length of the
update command, without excluding the trailing feature requests.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
No differences found