# [PATCH v1] pack-protocol: fix maximum pkt-line size

2 messages from 2016-08-29 to 2016-08-31. Participants: larsxschneider@gmail.com, Stefan Beller.
Thread: https://gitlist.dev/t/43956

## larsxschneider@gmail.com, 2016-08-29 17:55

Subject: [PATCH v1] pack-protocol: fix maximum pkt-line size
Message-ID: <20160829175509.69050-1-larsxschneider@gmail.com>
URL: https://gitlist.dev/e/20160829175509.69050-1-larsxschneider%40gmail.com

```
From: Lars Schneider <larsxschneider@gmail.com>

According to LARGE_PACKET_MAX in pkt-line.h the maximal length of a
pkt-line packet is 65520 bytes. The pkt-line header takes 4 bytes and
therefore the pkt-line data component must not exceed 65516 bytes.

Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
---

This patch was part of my "Git filter protocol" series [1]. Stefan
suggested to submit this patch individually as it is not strictly
required in the series [2].

Thanks,
Lars


[1] http://public-inbox.org/git/20160825110752.31581-1-larsxschneider@gmail.com/
[2] http://public-inbox.org/git/CAGZ79kaJn-yf28+Ls2JyqSs6Jt-Oj2JW-sAXQn-Oe5xaxSyjMQ@mail.gmail.com/


 Documentation/technical/protocol-common.txt | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Documentation/technical/protocol-common.txt b/Documentation/technical/protocol-common.txt
index bf30167..ecedb34 100644
--- a/Documentation/technical/protocol-common.txt
+++ b/Documentation/technical/protocol-common.txt
@@ -67,9 +67,9 @@ with non-binary data the same whether or not they contain the trailing
 LF (stripping the LF if present, and not complaining when it is
 missing).

-The maximum length of a pkt-line's data component is 65520 bytes.
-Implementations MUST NOT send pkt-line whose length exceeds 65524
-(65520 bytes of payload + 4 bytes of length data).
+The maximum length of a pkt-line's data component is 65516 bytes.
+Implementations MUST NOT send pkt-line whose length exceeds 65520
+(65516 bytes of payload + 4 bytes of length data).

 Implementations SHOULD NOT send an empty pkt-line ("0004").

--
2.9.2


```

## Stefan Beller, 2016-08-31 05:39

Subject: Re: [PATCH v1] pack-protocol: fix maximum pkt-line size
Message-ID: <CAGZ79kYv1o1M5KiR0yQeUUsZLo_VFbyDRNGSwPqjvV_s5HkFEw@mail.gmail.com>
URL: https://gitlist.dev/e/CAGZ79kYv1o1M5KiR0yQeUUsZLo_VFbyDRNGSwPqjvV_s5HkFEw%40mail.gmail.com
In-Reply-To: <20160829175509.69050-1-larsxschneider@gmail.com>

```
On Mon, Aug 29, 2016 at 10:55 AM,  <larsxschneider@gmail.com> wrote:
> From: Lars Schneider <larsxschneider@gmail.com>
>
> According to LARGE_PACKET_MAX in pkt-line.h the maximal length of a
> pkt-line packet is 65520 bytes. The pkt-line header takes 4 bytes and
> therefore the pkt-line data component must not exceed 65516 bytes.
>
> Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
> ---
>
> This patch was part of my "Git filter protocol" series [1]. Stefan
> suggested to submit this patch individually as it is not strictly
> required in the series [2].
>
> Thanks,
> Lars
>
>
> [1] http://public-inbox.org/git/20160825110752.31581-1-larsxschneider@gmail.com/
> [2] http://public-inbox.org/git/CAGZ79kaJn-yf28+Ls2JyqSs6Jt-Oj2JW-sAXQn-Oe5xaxSyjMQ@mail.gmail.com/
>
>
>  Documentation/technical/protocol-common.txt | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/technical/protocol-common.txt b/Documentation/technical/protocol-common.txt
> index bf30167..ecedb34 100644
> --- a/Documentation/technical/protocol-common.txt
> +++ b/Documentation/technical/protocol-common.txt
> @@ -67,9 +67,9 @@ with non-binary data the same whether or not they contain the trailing
>  LF (stripping the LF if present, and not complaining when it is
>  missing).
>
> -The maximum length of a pkt-line's data component is 65520 bytes.
> -Implementations MUST NOT send pkt-line whose length exceeds 65524
> -(65520 bytes of payload + 4 bytes of length data).
> +The maximum length of a pkt-line's data component is 65516 bytes.
> +Implementations MUST NOT send pkt-line whose length exceeds 65520
> +(65516 bytes of payload + 4 bytes of length data).
>
>  Implementations SHOULD NOT send an empty pkt-line ("0004").
>

This looks good,

Thanks,
Stefan

> --
> 2.9.2
>

```
