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

Re: [PATCH] t1450: fix quoting of NUL byte when corrupting pack

From
Chris Torek <chris.torek@gmail.com>
Date
Aug 2, 2020, 01:00 UTC
Message-ID
<CAPx1GvcZFVfmP8aTdXu_epdSn1EDy_cP6-=hi65c_5DbNEq+FQ@mail.gmail.com>
In-Reply-To
<20200801220611.10453-1-martin.agren@gmail.com>
On Sat, Aug 1, 2020 at 3:08 PM Martin Ågren <martin.agren@gmail.com> wrote:
>   printf '\0'
>
> to generate a NUL byte
[but]
> end up injecting the ASCII code for "0", 0x30, instead.
> -       printf '\0' | dd of=.git/objects/pack/pack-$pack.pack bs=1 conv=notrunc seek=12 &&
> +       printf "\0" | dd of=.git/objects/pack/pack-$pack.pack bs=1 conv=notrunc seek=12 &&

In sh/bash, this should make no difference, and that's what I get here. Am I missing something?

$ printf '\0' | hexdump 0000000 0000 0000001 $ printf "\0" | hexdump 0000000 0000 0000001

Chris
Previous: Martin ÅgrenNext: Chris Torek
Message 12 of 16 in “t1450: fix quoting of NUL byte when corrupting pack”
  1. t1450: fix quoting of NUL byte when corrupting packMartin Ågren, Aug 1, 2020
  2. Junio C HamanoAug 2, 2020
  3. Martin ÅgrenAug 2, 2020
  4. Eric SunshineAug 2, 2020
  5. 0/2 t: don't spuriously close and reopen quotesMartin Ågren, Aug 6, 2020
  6. 1/2 t: don't spuriously close and reopen quotesMartin Ågren, Aug 6, 2020
  7. Eric SunshineAug 6, 2020
  8. Martin ÅgrenAug 7, 2020
  9. Eric SunshineAug 7, 2020
  10. Junio C HamanoAug 7, 2020
  11. 2/2 t4104: modernize and simplify quotingMartin Ågren, Aug 6, 2020
  12. Chris TorekAug 2, 2020
  13. Chris TorekAug 2, 2020
  14. Martin ÅgrenAug 2, 2020
  15. Chris TorekAug 2, 2020
  16. Junio C HamanoAug 2, 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.