git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 0/4] fix pax extended header length calculation

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Aug 17, 2019, 16:40 UTC
Message-ID
<20190817164014.GE365197@genre.crustytoothpaste.net>
In-Reply-To
<c77a0081-93ab-7b97-e322-9616f6e7f86c@web.de>
On 2019-08-17 at 16:19:29, René Scharfe wrote:
Show 5 quoted lines
> The code for building pax extended headers has been miscalculating
> lengths slightly shorter than powers of 10  since I wrote it in 2006.
> That affects entries for paths with a length of 990, 991, 9989, 9990,
> 9991, 99988 etc. and link targets 4 characters shorter.  Here's a
> series for fixing it.

This series looked good to me. I'm don't completely understand our technique for computing the length, but the additional tests build my confidence and your explanation makes sense.

As a side note, I have personally found computing the length of pax headers to be enormously difficult due to this very edge case, so I'm not surprised this bug crept in.

-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
Previous: René Scharfe
Message 7 of 7 in “fix pax extended header length calculation”
  1. 0/4 fix pax extended header length calculationRené Scharfe, Aug 17, 2019
  2. 1/4 archive-tar: report wrong pax extended header lengthRené Scharfe, Aug 17, 2019
  3. 2/4 archive-tar: fix pax extended header length calculationRené Scharfe, Aug 17, 2019
  4. Eric SunshineAug 17, 2019
  5. 3/4 archive-tar: use size_t in strbuf_append_ext_header()René Scharfe, Aug 17, 2019
  6. 4/4 archive-tar: turn length miscalculation warning into BUGRené Scharfe, Aug 17, 2019
  7. brian m. carlsonAug 17, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.