Remove uaf patch for csv5 (upstream is good again)

This commit is contained in:
pancake 2022-01-09 19:48:35 +01:00 committed by GitHub
parent fb0ec6ed00
commit 24ece3a757
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,23 +0,0 @@
diff --git a/cs.c b/cs.c
index 786922b4..db75c756 100644
--- a/cs.c
+++ b/cs.c
@@ -540,6 +540,7 @@ static void fill_insn(struct cs_struct *handle, cs_insn *insn, char *buffer, MCI
// fill the instruction bytes.
// we might skip some redundant bytes in front in the case of X86
memcpy(insn->bytes, code + insn->size - copy_size, copy_size);
+ insn->op_str[0] = '\0';
insn->size = copy_size;
// alias instruction might have ID saved in OpcodePub
@@ -551,6 +552,10 @@ static void fill_insn(struct cs_struct *handle, cs_insn *insn, char *buffer, MCI
postprinter((csh)handle, insn, buffer, mci);
#ifndef CAPSTONE_DIET
+ char *prefix = strchr (buffer, '|');
+ if (prefix) {
+ *prefix = ' ';
+ }
char *tab = strchr (buffer, '\t');
if (tab) {
*tab = 0;