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