Re: [PATCH v7 2/2] http-backend: respect CONTENT_LENGTH for receive-pack
- Date: Mon, 4 Jun 2018 20:06:40 +0300
- From: Max Kirillov <max@xxxxxxxxxx>
- Subject: Re: [PATCH v7 2/2] http-backend: respect CONTENT_LENGTH for receive-pack
On Mon, Jun 04, 2018 at 01:31:58PM +0900, Junio C Hamano wrote: > Max Kirillov <max@xxxxxxxxxx> writes: >> + size_t n = xread(0, buf, chunk_length); >> + if (n < 0) >> + die_errno("Reading request failed"); > > n that is of type size_t is unsigned and cannot be negative here. Thanks, fixing it Do you think sanity check for n <= chunk_length (the code will go mad in this case) is needed? As far as I can see n returns straight from system's read()
- Follow-Ups:
- Re: [PATCH v7 2/2] http-backend: respect CONTENT_LENGTH for receive-pack
- From: Ramsay Jones
- Re: [PATCH v7 2/2] http-backend: respect CONTENT_LENGTH for receive-pack
- References:
- [PATCH v7 0/2] http-backend: respect CONTENT_LENGTH as specified by rfc3875
- From: Max Kirillov
- [PATCH v7 2/2] http-backend: respect CONTENT_LENGTH for receive-pack
- From: Max Kirillov
- Re: [PATCH v7 2/2] http-backend: respect CONTENT_LENGTH for receive-pack
- From: Junio C Hamano
- [PATCH v7 0/2] http-backend: respect CONTENT_LENGTH as specified by rfc3875
- Prev by Date: Re: [PATCH v4 00/21] Integrate commit-graph into 'fsck' and 'gc'
- Next by Date: Re: [PATCH] add -p: fix counting empty context lines in edited patches
- Previous by thread: Re: [PATCH v7 2/2] http-backend: respect CONTENT_LENGTH for receive-pack
- Next by thread: Re: [PATCH v7 2/2] http-backend: respect CONTENT_LENGTH for receive-pack
- Index(es):