Limit string size on one-character-strings. Fixes #480384.
This commit is contained in:
parent
00ff10cae4
commit
43f2dc6251
@ -1654,7 +1654,7 @@ PyCurses_EraseChar(PyObject *self, PyObject *args)
|
|||||||
|
|
||||||
ch = erasechar();
|
ch = erasechar();
|
||||||
|
|
||||||
return PyString_FromString(&ch);
|
return PyString_FromStringAndSize(&ch, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
@ -2012,7 +2012,7 @@ PyCurses_KillChar(PyObject *self, PyObject *args)
|
|||||||
|
|
||||||
ch = killchar();
|
ch = killchar();
|
||||||
|
|
||||||
return PyString_FromString(&ch);
|
return PyString_FromStringAndSize(&ch, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
|
Loading…
x
Reference in New Issue
Block a user