cs_disasm_ex() should verify handle->disasm() to catch the issue that this API is still called after cs_close(). bug reported by Gul

_v3_old
Nguyen Anh Quynh 11 years ago
parent b77d1f298e
commit 2edef8f27c
  1. 2
      cs.c

@ -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;

Loading…
Cancel
Save