Skip to content

Test raw binary data. - #130

Open
kousu wants to merge 1 commit into
cozmo:masterfrom
kousu:test-nul
Open

Test raw binary data.#130
kousu wants to merge 1 commit into
cozmo:masterfrom
kousu:test-nul

Conversation

@kousu

@kousu kousu commented Apr 2, 2019

Copy link
Copy Markdown

Many QR decoders do not handle this case well (but jsQR does!). I didn't find a test case that explicitly included embedded nulls, so I added one to protect this feature.

The source of this was a public domain sound sample, clipped to fit into a QR code:

$ curl "https://sampleswap.org//samples-ghost/DRUM%20LOOPS%20and%20BREAKS/161%20to%20180%20bpm/128\[kb\]161_amenvar3.aif.mp3" | 
  head -c 300 |
  qrencode -8 -v 10 \
  -o embedded-nul/input.png

Many QR decoders do not handle this case well.

The source of this was a public domain sound sample, clipped to fit into a QR code:
$ curl "https://sampleswap.org//samples-ghost/DRUM%20LOOPS%20and%20BREAKS/161%20to%20180%20bpm/128\[kb\]161_amenvar3.aif.mp3" | head -c 300 | qrencode -8 -v 10 -o embedded-nul/input.png
@kousu

kousu commented Apr 3, 2019

Copy link
Copy Markdown
Author

Heh, the author of qrencode has a page detailing this bug/feature: https://fukuchi.org/works/qrhack/qrhack1.html.en :P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant