commit | 6ac6255afabd5ce3a469a1247e239398df320d17 | [log] [tgz] |
---|---|---|
author | Carlo Marcelo Arenas Belón <carenas@sajinet.com.pe> | Tue Sep 15 01:03:03 2020 -0700 |
committer | GitHub <noreply@github.com> | Tue Sep 15 16:03:03 2020 +0800 |
tree | 7c5799fad8d3fcb492b91ffdb773142a71dac9bb | |
parent | 47f05e0c06e15abfbd08d023b09ca75a5a380543 [diff] |
include: avoid UB with signed overflow/shift (#1675) if integer is 32-bit, and numeric literals default to int type, the following applies (from The C Standard, 6.5.7, paragraph 4 [ISO/IEC 9899:2011]): If E1 has a signed type and nonnegative value, and E1 × 2^E2 is representable in the result type, then that is the resulting value; otherwise, the behavior is undefined. which means that the only way to safely shift is unsigned, so use 1U to indicate the shifted bit is unsigned.
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), Ethereum VM, 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
See COMPILE.TXT file for how to compile and install Capstone.
See docs/README for how to customize & program your own tools with Capstone.
See HACK.TXT file for the structure of the source code.
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.