Skip to content

Commit

Permalink
Fix in TestAddressBulk, initialize string memory in the test ref #34
Browse files Browse the repository at this point in the history
  • Loading branch information
Alvaro Denis committed Jun 6, 2019
1 parent 8af339a commit cbcc513
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/cgo/tests/check_cipher.address.common.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ START_TEST(TestAddressBulk)
err = SKY_cipher_Address_Verify(&addr, &pubkey);
ck_assert(err == SKY_OK);

GoString_ tempstrAddr;
int8_t buf[256] = {0};
GoString_ tempstrAddr = {.p = buf, .n = sizeof(buff)};
err = SKY_cipher_Address_String(&addr, &tempstrAddr);
ck_assert(err == SKY_OK);
registerMemCleanup((void*)tempstrAddr.p);
cipher__Address addr2;
GoString strAddr;
strAddr.n = tempstrAddr.n;
Expand Down

0 comments on commit cbcc513

Please sign in to comment.