x86: treat prefix-only sequences of bytes as invalid code. this fixes a NDP reported by @felixgr

This commit is contained in:
Nguyen Anh Quynh 2015-06-16 11:57:22 +08:00
parent 715d4474b5
commit 0e9da8736a
1 changed files with 1 additions and 1 deletions

View File

@ -437,7 +437,7 @@ static int readPrefixes(struct InternalInstruction *insn)
/* If we fail reading prefixes, just stop here and let the opcode reader deal with it */
if (consumeByte(insn, &byte))
break;
return -1;
if (insn->readerCursor - 1 == insn->startLocation
&& (byte == 0xf2 || byte == 0xf3)) {