From c22d59b07bcf99c8e571f26333b9156c269adeaa Mon Sep 17 00:00:00 2001 From: montag451 Date: Mon, 4 Jan 2021 15:23:31 +0100 Subject: [PATCH] Fix a bug introduced by fc5f4c95f78e5b1351a11969fa85ce5d07f75acc When PY_SSIZE_T_CLEAN is defined, PyArg_ParseTuple expects a Py_ssize_t instead of an int to store the size of the data --- pytun.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytun.c b/pytun.c index b450578..38162ce 100644 --- a/pytun.c +++ b/pytun.c @@ -684,7 +684,7 @@ static PyObject* pytun_tuntap_write(PyObject* self, PyObject* args) { pytun_tuntap_t* tuntap = (pytun_tuntap_t*)self; char* buf; - int len; + Py_ssize_t len; ssize_t written; if (!PyArg_ParseTuple(args, "s#:write", &buf, &len))