Skip to content

Commit

Permalink
Fix a bug introduced by fc5f4c9
Browse files Browse the repository at this point in the history
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
  • Loading branch information
montag451 committed Jan 4, 2021
1 parent ab82c97 commit c22d59b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pytun.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit c22d59b

Please sign in to comment.