diff options
Diffstat (limited to 'plugins/pychrysalide/analysis/contents')
-rw-r--r-- | plugins/pychrysalide/analysis/contents/memory.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/pychrysalide/analysis/contents/memory.c b/plugins/pychrysalide/analysis/contents/memory.c index 02d5862..8926300 100644 --- a/plugins/pychrysalide/analysis/contents/memory.c +++ b/plugins/pychrysalide/analysis/contents/memory.c @@ -59,7 +59,7 @@ static PyObject *py_memory_content_new(PyTypeObject *type, PyObject *args, PyObj { PyObject *result; /* Instance à retourner */ const char *data; /* Tampon interne de Python */ - Py_ssize_t length; /* Taille utilisé de ce tampon */ + int length; /* Taille utilisé de ce tampon */ int ret; /* Bilan de lecture des args. */ GBinContent *content; /* Version GLib du contenu */ @@ -74,6 +74,11 @@ static PyObject *py_memory_content_new(PyTypeObject *type, PyObject *args, PyObj "Where data is provided as string or read-only bytes-like object." \ " The string may contain embedded null bytes." + /** + * La taille doit être de type 'int' et non 'Py_ssize_t', sinon les 32 bits + * de poids fort ne sont pas initialisés ! + */ + ret = PyArg_ParseTuple(args, "s#", &data, &length); if (!ret) return NULL; |