mirror of
https://github.com/python/cpython.git
synced 2025-12-08 10:21:13 +00:00
Limit string size on one-character-strings. Fixes #480384.
This commit is contained in:
parent
00ff10cae4
commit
43f2dc6251
1 changed files with 2 additions and 2 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue