Skip to content

Commit

Permalink
Fix use of uninitialized value for some instructions
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
oleavr authored and aquynh committed Sep 27, 2016
1 parent 9b5f404 commit d3155db
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/X86/X86DisassemblerDecoder.c
Expand Up @@ -920,6 +920,7 @@ static int readOpcode(struct InternalInstruction *insn)
// printf(">>> readOpcode() = %x\n", insn->readerCursor);

insn->opcodeType = ONEBYTE;
insn->firstByte = 0x00;

if (insn->vectorExtensionType == TYPE_EVEX) {
switch (mmFromEVEX2of4(insn->vectorExtensionPrefix[1])) {
Expand Down

0 comments on commit d3155db

Please sign in to comment.