Commit Graph

678 Commits

Author SHA1 Message Date
Satoshi Tanda
d7e38cd903 suppress MSVC code analysis (PREfast) warnings
Signed-off-by: Satoshi Tanda <tanda.sat@gmail.com>
2016-09-27 08:08:58 -07:00
Ole André Vadla Ravnås
e0276cdb64 Fix use of uninitialized value for some instructions
Caught by Valgrind:

    Conditional jump or move depends on uninitialised value(s)
       at 0xD5BB6F: readModRM (X86DisassemblerDecoder.c:1528)
       by 0xD5BF02: getIDWithAttrMask (X86DisassemblerDecoder.c:1101)
       by 0xD5CC5E: getID (X86DisassemblerDecoder.c:1249)
       by 0xD5CC5E: decodeInstruction (X86DisassemblerDecoder.c:2335)
       by 0xD52009: X86_getInstruction (X86Disassembler.c:822)
       by 0xD51781: cs_disasm (cs.c:503)
2016-09-26 15:01:18 +02:00
Nguyen Anh Quynh
a5418178b2 arm: update imm in printOperand() to fix error reported by @trufae in PR #764 2016-09-22 22:25:09 +08:00
Simorfo
90adc35a8e AArch64 set good extender 2016-09-09 13:15:32 +02:00
Akihiko Odaki
2876044815 arm: treat ARM address as unsigned
It should be unsigned because:
* It does arithmetic operations
* Format strings have "%u" instead of "%d"
2016-09-03 14:28:46 +09:00
Nguyen Anh Quynh
dc7568a926 arm: fix issue #740 2016-08-11 17:01:48 +08:00
David Carne
8fb6b89113 x86: initialize eaDisplacement in 16-bit mode. Fixes #656 2016-07-18 23:28:04 +08:00
Nguyen Anh Quynh
3b461fb4dd x86: fix issue #717 2016-06-26 01:03:26 +08:00
tandasat
0368aa7c42 fix #681 2016-05-16 08:32:58 -07:00
tandasat
8d377f3b7b address warnings with capstone_static_winkernel 2016-05-04 05:54:28 -07:00
Nguyen Anh Quynh
3f461adae3 remove myinttypes.h 2016-04-26 09:47:30 +08:00
tandasat
152c1baf9f skip stdint.h for windows driver configuration 2016-04-23 15:58:31 -07:00
Nguyen Anh Quynh
896d69f4ad x86: handle some AVX & segment-related instructions properly. this fixes a segfault reported by @revskills 2016-04-19 15:41:16 +08:00
tandasat
cb2b4e6263 Replaced snprintf with cs_snprintf 2016-03-31 18:07:53 -07:00
Ammar Ben Khadra
db0a00f2c0 Fix classification of ARM jump instructions
All jump instructions have been classified based on the direct
and indirect_branch flags instead of explicitly stating ARM_GRP_JUMP.
2015-12-17 12:36:48 +01:00
Wesley M
133f6b3c89 Refactoring conditional directives for incomplete if conditions. 2015-12-07 21:28:30 -03:00
kokole
6d9573c56f LOOP* branch fix for full x64 instructions
Sorry, since the file is very big I didn't realize there was a 2nd list.
2015-10-18 19:42:31 +02:00
kokole
5a0e31ffd5 LOOP* instructions are conditional branches
LOOP, LOOPE and LOOPNE are basically conditional branches http://x86.renejeschke.de/html/file_module_x86_id_161.html
2015-10-18 15:13:25 +02:00
Nguyen Anh Quynh
da470f35b2 x86: coding style 2015-10-08 15:49:12 +08:00
bughoho
afdedac368 fix comment 2015-10-08 08:49:00 +08:00
bughoho
55cd95e497 add dedicated variables such as prefix2e, prefix36, prefix66, prefix67, etc 2015-10-07 14:47:24 +08:00
bughoho
915f5bb879 fix:prefix 0x67 missed. 2015-10-06 11:42:32 +08:00
bughoho
ec31ea84ee https://github.com/aquynh/capstone/issues/483 2015-09-28 15:08:25 +08:00
Nguyen Anh Quynh
ebf0041e6a arm: another fix for #446. bug reported by @uxmal 2015-08-19 22:36:37 +08:00
Nguyen Anh Quynh
609e342fef x86: another attempt to fix #456 2015-08-19 09:34:56 +08:00
Nguyen Anh Quynh
0dde6707b9 x86: another attempt for #456 2015-08-16 18:43:49 +08:00
Nguyen Anh Quynh
0e45cd2904 x86: more AT&T fixes for #458 reported by Ruslan Kabatsayev 2015-08-15 23:51:36 +08:00
Nguyen Anh Quynh
e075bb5f7f x86: more fix for #458 2015-08-15 17:03:48 +08:00
Nguyen Anh Quynh
c3871eaa5a x86: fix issue #458 reported by Ruslan Kabatsayev 2015-08-15 15:05:27 +08:00
Nguyen Anh Quynh
4243d21a68 x86: fix issue #456 reported by Ruslan Kabatsayev 2015-08-15 14:46:51 +08:00
Nguyen Anh Quynh
2202a0d40d arm: fix issue #459 reported by Ahmed Garhy 2015-08-15 14:16:39 +08:00
Nguyen Anh Quynh
9899510e01 x86: fix target addresses of CALL/JMP rel16. bug reported by Ruslan Kabatsayev 2015-08-15 13:25:13 +08:00
Nguyen Anh Quynh
96ba58fd34 x86: REPNE prefix is valid for LODSD. this fixes the bug reported by Ruslan Kabatsayev 2015-08-14 22:08:41 +08:00
Nguyen Anh Quynh
b4c4d4506f x86: some AT&T instructions wrongly add one more operand in front (index 0). this fixes the issue reported by Ruslan Kabatsayev 2015-08-14 22:05:05 +08:00
Nguyen Anh Quynh
b0b5fb8db1 x86: repne prefix can come with INS/OUTS/LODS instructions. bug reported by Ruslan Kabatsayev 2015-08-14 21:34:09 +08:00
Nguyen Anh Quynh
12bd773d5e x86: rep* prefix read/write *CX register. bug reported by Ruslan Kabatsayev 2015-08-14 16:59:07 +08:00
Nguyen Anh Quynh
c0f3fad4a5 x86: fix operand size of farjmp/farcall. bug reported by Ruslan Kabatsayev 2015-08-14 10:46:55 +08:00
Nguyen Anh Quynh
d57786260a x86: loope/loopne read EFLAGS. bug reported by Ruslan Kabatsayev 2015-08-14 08:57:58 +08:00
Nguyen Anh Quynh
d4ce57bfda sparc: fix POPC instruction. bug reported by @zonkzonk & @pancake 2015-08-14 00:27:07 +08:00
Nguyen Anh Quynh
751f84f086 x86: LOOP* instructions should read/write *CX registers. bug reported by Ruslan Kabatsayev 2015-08-14 00:16:26 +08:00
Nguyen Anh Quynh
c0bf5feac9 x86: fix selector part of farjmp/farcall instructions. bug reported by Ruslan Kabatsayev 2015-08-13 23:38:01 +08:00
Nguyen Anh Quynh
1757603fb1 x86: truncat immediate for non-64bit. this fixes the disassembly of the code e9e9eeeeee in 32bit mode 2015-07-11 10:01:24 +08:00
Nguyen Anh Quynh
1304fc225a mips: remove alias_insns[] 2015-06-22 15:48:45 +08:00
Nguyen Anh Quynh
a25e41b76c mips: delete the alias map SUBU to NEGU. bug reported by @joelpx 2015-06-22 11:21:49 +08:00
Nguyen Anh Quynh
459556c769 x86: fix immediate operand of AND/OR/XOR instructions. bug reported by @yegord 2015-06-20 10:56:54 +08:00
Nguyen Anh Quynh
2f6ea60772 mips: return Fail on assert failure in MipsDisassembler.c 2015-06-16 14:09:25 +08:00
Nguyen Anh Quynh
3a46e85ad2 ppc: return failure when Base>=32 in decodeMemRIOperands() 2015-06-16 14:03:22 +08:00
Nguyen Anh Quynh
7ae9c9d9d3 ppc: handle invalid CR bits with more than 8 zeros in decodeCRBitMOperand(). bug reported by @felixgr 2015-06-16 13:59:10 +08:00
Nguyen Anh Quynh
e5aa75131b x86: treat prefix-only sequences of bytes as invalid code. this fixes a NDP reported by @felixgr 2015-06-16 11:57:45 +08:00
Nguyen Anh Quynh
fb18a93f73 ppc: avoid potential memleak issue when alias mnemonic is empty in PPC_printInst() 2015-06-06 19:11:25 +08:00