Thread (2 messages) flat view 2 messages, 2 authors, 2016-07-14

Re: [PATCH 2/4] receive-pack: implement advertising and receiving push options

From: Jeff King <hidden>
Date: 2016-07-14 19:45:31

On Thu, Jul 14, 2016 at 12:07:15PM -0700, Junio C Hamano wrote:
quoted
Although as you remarked in another email, this would not pose a problem for
the shell variable, so we could also drop it to allow multi line
options. will do.
One thing to note is that I do not think there is a guarantee that
packet_buf[] is NUL-terminated, and when len == LAGE_PACKET_MAX, you
do not have room to NUL-terminate it yourself.
packet_read() does NUL-terminate for you. It gets the extra bytes
because it doesn't store the 4-byte size in the output (whereas the
client does not ever send anything over LARGE_PACKET_MAX, _including_
those bytes, so we always have room to store its result in our
LARGE_PACKET_MAX buffer, plus the NUL, with 3 bytes to spare).

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help