summaryrefslogtreecommitdiff
path: root/plugins/yaml
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2020-02-18 21:15:26 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2020-02-18 21:15:26 (GMT)
commitcd6b1657ed58ddbb0e5d7f13c1428b19310b90bd (patch)
tree6916d51c62a1cbf7a762af32d2894a8756076917 /plugins/yaml
parent838ed83634c445e4ba1b15998f4ad50d1e7503c9 (diff)
Parsed Python bytes-like objects arguments with care.
Diffstat (limited to 'plugins/yaml')
-rw-r--r--plugins/yaml/python/reader.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/yaml/python/reader.c b/plugins/yaml/python/reader.c
index 809ece2..a69e54f 100644
--- a/plugins/yaml/python/reader.c
+++ b/plugins/yaml/python/reader.c
@@ -84,6 +84,11 @@ static PyObject *py_yaml_reader_new_from_content(PyObject *self, PyObject *args)
"Load a Yaml content." \
)
+ /**
+ * 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#", &content, &length);
if (!ret) return NULL;