mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
Bug #1548092: fix curses.tparm seg fault on invalid input. Needs backport to 2.5.1 and earlier.
This commit is contained in:
parent
d7df712ed7
commit
6aefa916a9
2 changed files with 6 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue