diff --git a/lib/cgo/tests/check_cipher.address.common.c b/lib/cgo/tests/check_cipher.address.common.c index bce877630..0d0554b38 100644 --- a/lib/cgo/tests/check_cipher.address.common.c +++ b/lib/cgo/tests/check_cipher.address.common.c @@ -143,7 +143,7 @@ START_TEST(TestAddressFromBytes) SKY_cipher_Address_Bytes(&addr, &tempBytes); ck_assert_msg(tempBytes.len > 0, "address bytes written"); - copyGoSlice_toGoSlice(&bytes, &tempBytes, tempBytes.len); + copyGoSlice_toGoSlice(&bytes, &tempBytes, sizeof(*buff)); err = SKY_cipher_AddressFromBytes(bytes, &addr2); ck_assert_msg(err == SKY_OK, "convert bytes to SKY address"); diff --git a/lib/cgo/tests/check_cipher.hash.common.c b/lib/cgo/tests/check_cipher.hash.common.c index 9a698d1e1..49b364e77 100644 --- a/lib/cgo/tests/check_cipher.hash.common.c +++ b/lib/cgo/tests/check_cipher.hash.common.c @@ -213,7 +213,6 @@ START_TEST(TestSHA256FromHex) // Valid hex hash GoString_ s2; - memset(&s2, 0, sizeof(GoString_)); SKY_cipher_SHA256_Hex(&h, &s2); registerMemCleanup((void*)s2.p); cipher__SHA256 h2;