Skip to content

Commit

Permalink
cs_disasm_ex() should verify handle->disasm() to catch the issue that…
Browse files Browse the repository at this point in the history
… this API is still called after cs_close(). bug reported by Gul
  • Loading branch information
aquynh committed Feb 27, 2014
1 parent b77d1f2 commit 2edef8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ size_t cs_disasm_ex(csh ud, const uint8_t *buffer, size_t size, uint64_t offset,
void *total = NULL;
size_t total_size = 0;

if (!handle) {
if (!handle || handle->disasm == NULL) {
// FIXME: how to handle this case:
// handle->errnum = CS_ERR_HANDLE;
return 0;
Expand Down

0 comments on commit 2edef8f

Please sign in to comment.