summaryrefslogtreecommitdiffstats
path: root/Modules/_cursesmodule.c
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2001-11-11 14:49:15 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2001-11-11 14:49:15 (GMT)
commit43f2dc6251e4c672e02ea0d62b2a8243408041ca (patch)
treedc4e4ad4bdedbaf6cd8625c627ebeaab06427f30 /Modules/_cursesmodule.c
parent00ff10cae426a529ea9aa473e0ba9ab905cf7c81 (diff)
downloadcpython-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.c4
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 *