Fixed bug on odd byte ip addresses
IP addresses that when converted to an integer ended up as a string with an odd number of bytes would result in a memory read into invalid memory. Zero filled the text string representation of the bytes to avoid this issue.
This commit is contained in:
parent
7c6bd1e36b
commit
58a6240af9
3 changed files with 42 additions and 7 deletions
|
@ -10,7 +10,8 @@ const char* names[] = {
|
|||
"test_multiaddr_utils",
|
||||
"test_multiaddr_peer_id",
|
||||
"test_multiaddr_get_peer_id",
|
||||
"test_multiaddr_bytes"
|
||||
"test_multiaddr_bytes",
|
||||
"test_new_like_libp2p"
|
||||
};
|
||||
|
||||
int (*funcs[])(void) = {
|
||||
|
@ -21,7 +22,8 @@ int (*funcs[])(void) = {
|
|||
test_multiaddr_utils,
|
||||
test_multiaddr_peer_id,
|
||||
test_multiaddr_get_peer_id,
|
||||
test_multiaddr_bytes
|
||||
test_multiaddr_bytes,
|
||||
test_new_like_libp2p
|
||||
};
|
||||
|
||||
int testit(const char* name, int (*func)(void)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue