tests: Check decode with high bits set fails

This doesn't catch out-of-bounds memory access, but it's a good test to have anyway.
This commit is contained in:
Luke Dashjr
2015-02-28 02:21:00 +00:00
parent b6adca8ebb
commit cdeed0709e
2 changed files with 6 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
#!/bin/sh
hex=$(echo 993233 | xxd -r -p | base58 -d 25 || echo FAIL)
test "x${hex}" = "xFAIL"

3
tests/decode-highbit.sh Normal file
View File

@@ -0,0 +1,3 @@
#!/bin/sh
hex=$(echo 319932 | xxd -r -p | base58 -d 25 || echo FAIL)
test "x${hex}" = "xFAIL"