diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2006-09-02 02:50:35 +0000 |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2006-09-02 02:50:35 +0000 |
commit | 6aefa916a96f7d3ce7f634134dba6060c68b647a (patch) | |
tree | 89ae9199888bdc2ae9828590310a695b8b99d58d /Modules/_cursesmodule.c | |
parent | SF #1547931, fix typo (missing and). Will backport to 2.5 (diff) | |
download | cpython-6aefa916a96f7d3ce7f634134dba6060c68b647a.tar.gz cpython-6aefa916a96f7d3ce7f634134dba6060c68b647a.tar.bz2 cpython-6aefa916a96f7d3ce7f634134dba6060c68b647a.zip |
Bug #1548092: fix curses.tparm seg fault on invalid input. Needs backport to 2.5.1 and earlier.
Diffstat (limited to 'Modules/_cursesmodule.c')
-rw-r--r-- | Modules/_cursesmodule.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c index 2921d53a8f5..aeb1ef5f22e 100644 --- a/Modules/_cursesmodule.c +++ b/Modules/_cursesmodule.c @@ -2334,6 +2334,10 @@ PyCurses_tparm(PyObject *self, PyObject *args) } result = tparm(fmt,i1,i2,i3,i4,i5,i6,i7,i8,i9); + if (!result) { + PyErr_SetString(PyCursesError, "tparm() returned NULL"); + return NULL; + } return PyString_FromString(result); } |