Re: [PATCH 3/3] remote-curl: sanity check ref advertisement from server

2013-02-17 Thread Jonathan Nieder
Jeff King wrote: If the smart HTTP response from the server is truncated for any reason, we will get an incomplete ref advertisement. If we then feed this incomplete list to fetch-pack, one of a few things may happen: 1. If the truncation is in a packet header, fetch-pack will

Re: [PATCH 3/3] remote-curl: sanity check ref advertisement from server

2013-02-17 Thread Jeff King
On Sun, Feb 17, 2013 at 03:05:34AM -0800, Jonathan Nieder wrote: Jeff King wrote: If the smart HTTP response from the server is truncated for any reason, we will get an incomplete ref advertisement. If we then feed this incomplete list to fetch-pack, one of a few things may happen:

Re: [PATCH 3/3] remote-curl: sanity check ref advertisement from server

2013-02-17 Thread Jonathan Nieder
Jeff King wrote: On Sun, Feb 17, 2013 at 03:05:34AM -0800, Jonathan Nieder wrote: Jeff King wrote: + if (verify_ref_advertisement(last-buf, last-len) 0) + die(ref advertisement is invalid at %s, refs_url); Won't this error out with protocol error: bad

[PATCH 3/3] remote-curl: sanity check ref advertisement from server

2013-02-15 Thread Jeff King
If the smart HTTP response from the server is truncated for any reason, we will get an incomplete ref advertisement. If we then feed this incomplete list to fetch-pack, one of a few things may happen: 1. If the truncation is in a packet header, fetch-pack will notice the bogus line and