diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2001-11-11 14:49:15 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2001-11-11 14:49:15 (GMT) |
commit | 43f2dc6251e4c672e02ea0d62b2a8243408041ca (patch) | |
tree | dc4e4ad4bdedbaf6cd8625c627ebeaab06427f30 /Modules/_cursesmodule.c | |
parent | 00ff10cae426a529ea9aa473e0ba9ab905cf7c81 (diff) | |
download | cpython-43f2dc6251e4c672e02ea0d62b2a8243408041ca.zip cpython-43f2dc6251e4c672e02ea0d62b2a8243408041ca.tar.gz cpython-43f2dc6251e4c672e02ea0d62b2a8243408041ca.tar.bz2 |
Limit string size on one-character-strings. Fixes #480384.
Diffstat (limited to 'Modules/_cursesmodule.c')
-rw-r--r-- | Modules/_cursesmodule.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c index e6f5ef1..c22b500 100644 --- a/Modules/_cursesmodule.c +++ b/Modules/_cursesmodule.c @@ -1654,7 +1654,7 @@ PyCurses_EraseChar(PyObject *self, PyObject *args) ch = erasechar(); - return PyString_FromString(&ch); + return PyString_FromStringAndSize(&ch, 1); } static PyObject * @@ -2012,7 +2012,7 @@ PyCurses_KillChar(PyObject *self, PyObject *args) ch = killchar(); - return PyString_FromString(&ch); + return PyString_FromStringAndSize(&ch, 1); } static PyObject * |