Skip to content

Commit

Permalink
initializes all bytes to zero in insn->detail
Browse files Browse the repository at this point in the history
  • Loading branch information
imbillow committed Jun 26, 2024
1 parent de04594 commit 67ea637
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1226,7 +1226,8 @@ size_t CAPSTONE_API cs_disasm(csh ud, const uint8_t *buffer, size_t size, uint64

if (handle->detail_opt) {
// allocate memory for @detail pointer
insn_cache->detail = cs_mem_malloc(sizeof(cs_detail));
insn_cache->detail =
cs_mem_calloc(1, sizeof(cs_detail));
} else {
insn_cache->detail = NULL;
}
Expand Down

0 comments on commit 67ea637

Please sign in to comment.