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
|
@ -25,6 +25,8 @@ Library
|
|||
Extension Modules
|
||||
-----------------
|
||||
|
||||
- Bug #1548092: fix curses.tparm seg fault on invalid input.
|
||||
|
||||
|
||||
Tests
|
||||
-----
|
||||
|
|
|
@ -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…
Reference in New Issue