commit | 2edef8f27cf903f7a6c8b40e6207aa0d635cb405 | [log] [tgz] |
---|---|---|
author | Nguyen Anh Quynh <aquynh@gmail.com> | Thu Feb 27 09:54:16 2014 +0800 |
committer | Nguyen Anh Quynh <aquynh@gmail.com> | Thu Feb 27 09:54:16 2014 +0800 |
tree | 3b55dca8cd71f6a7b1978cc7803315e1d2a459c4 | |
parent | b77d1f298e54cb710007841f3672bbbf28d46407 [diff] |
cs_disasm_ex() should verify handle->disasm() to catch the issue that this API is still called after cs_close(). bug reported by Gul
diff --git a/cs.c b/cs.c index 4f561a1..07f28a4 100644 --- a/cs.c +++ b/cs.c
@@ -320,7 +320,7 @@ 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;