Bug #1548092: fix curses.tparm seg fault on invalid input. Needs backport to 2.5.1 and earlier.

This commit is contained in:
Neal Norwitz 2006-09-02 02:50:35 +00:00
parent d7df712ed7
commit 6aefa916a9
2 changed files with 6 additions and 0 deletions

View File

@ -25,6 +25,8 @@ Library
Extension Modules
-----------------
- Bug #1548092: fix curses.tparm seg fault on invalid input.
Tests
-----

View File

@ -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);
}