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

Re: [PATCH] Limit the size of the data block passed to SHA1_Update()

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 1, 2015, 18:37 UTC
Message-ID
<xmqqh9l5h8g3.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<1446359536-25829-1-git-send-email-apahlevan@ieee.org>
atousa.p@gmail.com writes:
Show 17 quoted lines
> diff --git a/cache.h b/cache.h
> index 79066e5..ec84b16 100644
> --- a/cache.h
> +++ b/cache.h
> @@ -14,7 +14,12 @@
>  #ifndef git_SHA_CTX
>  #define git_SHA_CTX	SHA_CTX
>  #define git_SHA1_Init	SHA1_Init
> -#define git_SHA1_Update	SHA1_Update
> +#ifdef SHA1_MAX_BLOCK_SIZE
> +extern int SHA1_Update_Chunked(SHA_CTX *, const void *, size_t);
> +#define git_SHA1_Update SHA1_Update_Chunked
> +#else
> +#define git_SHA1_Update SHA1_Update
> +#endif
>  #define git_SHA1_Final	SHA1_Final
>  #endif

Hmm, I admit that this mess is my creation, but unfortunately it does not allow us to say:

	make SHA1_MAX_BLOCK_SIZE='1024L*1024L*1024L'
when using other SHA-1 implementations (e.g. blk_SHA1_Update()).
Ideas for cleaning it up, anybody?
Previous: Eric SunshineNext: Atousa Duprat
Message 15 of 27 in “git fsck failure on OS X with files >= 4 GiB”
  1. Rafael EspíndolaOct 28, 2015
  2. Filipe CabecinhasOct 29, 2015
  3. Rafael EspíndolaOct 29, 2015
  4. Filipe CabecinhasOct 29, 2015
  5. Atousa DupratOct 29, 2015
  6. Junio C HamanoOct 29, 2015
  7. Atousa DupratOct 30, 2015
  8. Limit the size of the data block passed to SHA1_Update()Atousa Pahlevan Duprat, Oct 30, 2015
  9. Junio C HamanoOct 30, 2015
  10. Atousa DupratNov 1, 2015
  11. Junio C HamanoNov 1, 2015
  12. Eric SunshineNov 1, 2015
  13. Limit the size of the data block passed to SHA1_Update()atousa.p@gmail.com, Nov 1, 2015
  14. Eric SunshineNov 1, 2015
  15. Junio C HamanoNov 1, 2015
  16. Atousa DupratNov 2, 2015
  17. Junio C HamanoNov 2, 2015
  18. 1/2 Limit the size of the data block passed to SHA1_Update()atousa.p@gmail.com, Nov 3, 2015
  19. Torsten BögershausenNov 3, 2015
  20. Limit the size of the data block passed to SHA1_Update()atousa.p@gmail.com, Nov 4, 2015
  21. Eric SunshineNov 4, 2015
  22. Atousa DupratNov 4, 2015
  23. Junio C HamanoNov 4, 2015
  24. Limit the size of the data block passed to SHA1_Update()Atousa Pahlevan Duprat, Oct 30, 2015
  25. Randall S. BeckerOct 30, 2015
  26. Junio C HamanoOct 31, 2015
  27. Atousa DupratNov 1, 2015

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.