Avoids leak in wasm details (#1372)

* Avoids leak in wasm details

Extending cs_detail in capstone.h

* Safety checks before allocating memory for brtable in WASM

* Revert "Avoids leak in wasm details"

This reverts commit 03f822b34a03f23554aaffb2951b62c62645e5e5.

* Refactoring brtable for WASM

* Fix undefined shift in WASM get_varuint64
3 files changed
tree: b1be7494fe28303b3e64704d9da6c4235a4849a1
  1. .appveyor.yml
  2. .gitattributes
  3. .gitignore
  4. .travis.yml
  5. CMakeLists.txt
  6. COMPILE.TXT
  7. COMPILE_CMAKE.TXT
  8. COMPILE_MSVC.TXT
  9. CREDITS.TXT
  10. ChangeLog
  11. HACK.TXT
  12. LEB128.h
  13. LICENSE.TXT
  14. LICENSE_LLVM.TXT
  15. MCDisassembler.h
  16. MCFixedLenDisassembler.h
  17. MCInst.c
  18. MCInst.h
  19. MCInstrDesc.c
  20. MCInstrDesc.h
  21. MCRegisterInfo.c
  22. MCRegisterInfo.h
  23. Makefile
  24. MathExtras.h
  25. README.md
  26. RELEASE_NOTES
  27. SPONSORS.TXT
  28. SStream.c
  29. SStream.h
  30. TODO
  31. arch/
  32. bindings/
  33. capstone.pc.in
  34. cmake-x86.sh
  35. cmake.sh
  36. config.mk
  37. contrib/
  38. cs.c
  39. cs_priv.h
  40. cstool/
  41. docs/
  42. functions.mk
  43. include/
  44. make.sh
  45. msvc/
  46. nmake-x86.bat
  47. nmake.bat
  48. packages/
  49. pkgconfig.mk
  50. suite/
  51. tests/
  52. utils.c
  53. utils.h
  54. windows/
  55. windowsce/
  56. xcode/
README.md

Capstone Engine

Build Status Build status pypi package pypi downloads

Capstone is a disassembly framework with the target of becoming the ultimate disasm engine for binary analysis and reversing in the security community.

Created by Nguyen Anh Quynh, then developed and maintained by a small community, Capstone offers some unparalleled features:

  • Support multiple hardware architectures: ARM, ARM64 (ARMv8), BPF, Ethereum VM, Webassembly, M68K, Mips, MOS65XX, PPC, Sparc, SystemZ, TMS320C64X, M680X, XCore and X86 (including X86_64).

  • Having clean/simple/lightweight/intuitive architecture-neutral API.

  • Provide details on disassembled instruction (called “decomposer” by others).

  • Provide semantics of the disassembled instruction, such as list of implicit registers read & written.

  • Implemented in pure C language, with lightweight bindings for D, Clojure, F#, Common Lisp, Visual Basic, PHP, PowerShell, Emacs, Haskell, Perl, Python, Ruby, C#, NodeJS, Java, GO, C++, OCaml, Lua, Rust, Delphi, Free Pascal & Vala ready either in main code, or provided externally by the community).

  • Native support for all popular platforms: Windows, Mac OSX, iOS, Android, Linux, *BSD, Solaris, etc.

  • Thread-safe by design.

  • Special support for embedding into firmware or OS kernel.

  • High performance & suitable for malware analysis (capable of handling various X86 malware tricks).

  • Distributed under the open source BSD license.

Further information is available at http://www.capstone-engine.org

Compile

See COMPILE.TXT file for how to compile and install Capstone.

Documentation

See docs/README for how to customize & program your own tools with Capstone.

Hack

See HACK.TXT file for the structure of the source code.

License

This project is released under the BSD license. If you redistribute the binary or source code of Capstone, please attach file LICENSE.TXT with your products.