Skip to content

Commit

Permalink
fix memset length
Browse files Browse the repository at this point in the history
  • Loading branch information
douyixuan committed Jul 17, 2024
1 parent 6fe66a2 commit 1b26cb6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion third-party/xudt/wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ ByteSlice make_byte_slice(uint32_t len, uint32_t cap, uint32_t offset, uint8_t*
ByteSlice lock_scripts() {
uint32_t hashes_count = 0;
uint8_t *hashes = malloc(sizeof(uint8_t) * BLAKE2B_BLOCK_SIZE * MAX_LOCK_SCRIPT_HASH_COUNT);
memset(hashes, 0, sizeof(hashes));
memset(hashes, 0, BLAKE2B_BLOCK_SIZE * MAX_LOCK_SCRIPT_HASH_COUNT);
ByteSlice bs = make_byte_slice(0, 0, 0, NULL);
// collect hashes
size_t i = 0;
Expand Down

0 comments on commit 1b26cb6

Please sign in to comment.