diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2021-08-14 19:54:31 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2021-08-14 19:54:31 (GMT) |
commit | a6c0351774988094a51c9502f2a8e07633956263 (patch) | |
tree | dcaad9d00b6ce130d9af012286899ab877cc82cb /plugins/pychrysalide/arch/operands/target.c | |
parent | 0daed1fa6212eb83b65ccd10c9f2c80bf12c6d27 (diff) |
Improve the object padding exploitation for operands.
Diffstat (limited to 'plugins/pychrysalide/arch/operands/target.c')
-rw-r--r-- | plugins/pychrysalide/arch/operands/target.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/pychrysalide/arch/operands/target.c b/plugins/pychrysalide/arch/operands/target.c index 5cd9f59..76c8269 100644 --- a/plugins/pychrysalide/arch/operands/target.c +++ b/plugins/pychrysalide/arch/operands/target.c @@ -176,7 +176,8 @@ static int py_target_operand_init(PyObject *self, PyObject *args, PyObject *kwds MemoryDataSize size; /* Taille des adresses mémoire */ vmpa2t *addr; /* Emplacement de symbole */ int ret; /* Bilan de lecture des args. */ - GTargetOperand *operand; /* Opérande à manipuler */ + GTargetOperand *operand; /* Opérande à manipuler */ + tarop_extra_data_t *extra; /* Données insérées à modifier */ #define TARGET_OPERAND_DOC \ "The TargetOperand object translates immediate values as symbols.\n" \ @@ -203,7 +204,10 @@ static int py_target_operand_init(PyObject *self, PyObject *args, PyObject *kwds operand = G_TARGET_OPERAND(pygobject_get(self)); - operand->size = size; + extra = GET_TARGET_OP_EXTRA(operand); + + extra->size = size; + copy_vmpa(&operand->addr, addr); clean_vmpa_arg(addr); |