Commit 6aefa916 authored by Neal Norwitz's avatar Neal Norwitz

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

parent d7df712e
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment