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

Re: [PATCH] Avoid infinite loop in malformed packfiles

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 30, 2020, 16:15 UTC
Message-ID
<xmqqwo1gglf5.fsf@gitster.c.googlers.com>
In-Reply-To
<59efeeab-49de-17e7-8b1c-355d6ef31b5d@web.de>
René Scharfe <l.s.r@web.de> writes:
>> Will that work? I'd expect that modern pack files end up being
>> offset deltas, rather than reference deltas.
>
> True, but going down all the way would work:

Perhaps, but I'd rather use pack-objects to prepare the repository with no-delta-base-offset to force ref deltas.

Show 20 quoted lines
> diff --git a/t/t5316-pack-delta-depth.sh b/t/t5316-pack-delta-depth.sh
> index 0f06c40eb1..7fd21cd3ce 100755
> --- a/t/t5316-pack-delta-depth.sh
> +++ b/t/t5316-pack-delta-depth.sh
> @@ -94,4 +94,15 @@ test_expect_success '--depth limits depth' '
>  	test_i18ncmp expect actual
>  '
>
> +test_expect_success 'maxAllowedDeltaDepth is respected' '
> +	git clone . clone1 &&
> +	(
> +		cd clone1 &&
> +		git repack -a -d &&
> +		test_config core.maxAllowedDeltaDepth 0 &&
> +		test_must_fail git fsck 2>err &&
> +		test_i18ngrep "overlong delta chain" err
> +	)
> +'
> +
>  test_done
Previous: René ScharfeNext: Jeff King
Message 14 of 20 in “Avoid infinite loop in malformed packfiles”
  1. Avoid infinite loop in malformed packfilesOri Bernstein, Aug 23, 2020
  2. ori@eigenstate.orgAug 23, 2020
  3. Eric SunshineAug 23, 2020
  4. Avoid infinite loop in malformed packfilesOri Bernstein, Aug 23, 2020
  5. René ScharfeAug 23, 2020
  6. Ori BernsteinAug 23, 2020
  7. René ScharfeAug 24, 2020
  8. Jeff KingAug 24, 2020
  9. Junio C HamanoAug 24, 2020
  10. Jeff KingAug 24, 2020
  11. Junio C HamanoAug 24, 2020
  12. ori@eigenstate.orgAug 30, 2020
  13. René ScharfeAug 30, 2020
  14. Junio C HamanoAug 30, 2020
  15. Jeff KingAug 31, 2020
  16. Junio C HamanoAug 31, 2020
  17. Jeff KingAug 31, 2020
  18. ori@eigenstate.orgAug 31, 2020
  19. Junio C HamanoAug 24, 2020
  20. Junio C HamanoAug 24, 2020

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.