summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2010-09-12 13:37:53 +0400
committerCyrill Gorcunov <gorcunov@gmail.com>2010-09-12 13:37:53 +0400
commit9e1c9ce8e9cee778d4fee89e83207a4bda539bdd (patch)
tree16d281929803002be6772b18394ee23da2f499a0
parent5ace91d6819bd8341699c1e24dddfbbf1e58c38a (diff)
downloadnasm-9e1c9ce8e9cee778d4fee89e83207a4bda539bdd.tar.gz
BR3064376: ndisasm crash
ndisasm may crash due to lack of check of VEX table index. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
-rw-r--r--disasm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/disasm.c b/disasm.c
index ba282d34..63208526 100644
--- a/disasm.c
+++ b/disasm.c
@@ -1102,7 +1102,7 @@ int32_t disasm(uint8_t *data, char *output, int outbufsize, int segsize,
prefix.vex_v = (~prefix.vex[2] >> 3) & 15;
prefix.vex_lp = prefix.vex[2] & 7;
- ix = itable_vex[RV_XOP][prefix.vex_m][prefix.vex_lp];
+ ix = itable_vex[RV_XOP][prefix.vex_m][prefix.vex_lp & 3];
}
end_prefix = true;
break;