Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix Hex_test unit test
There was no space for the trailing '\0' in the array used to
store the hex string in Hex_test which resulted in a segfault.
Increasing the size of the array by one fixes that.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
  • Loading branch information
dangowrt committed May 20, 2015
1 parent 952bd9c commit 6a8e02b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion util/test/Hex_test.c
Expand Up @@ -28,7 +28,7 @@ int main()
uint8_t bytes[32];
Random_bytes(rand, bytes, 32);

uint8_t hex[64] = {0};
uint8_t hex[65] = {0};

Assert_true(Hex_encode(hex, 65, bytes, 32) == 64);

Expand Down

0 comments on commit 6a8e02b

Please sign in to comment.