mirror of
https://github.com/python/cpython.git
synced 2025-11-02 19:12:55 +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
|
|
@ -25,6 +25,8 @@ Library
|
||||||
Extension Modules
|
Extension Modules
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
|
- Bug #1548092: fix curses.tparm seg fault on invalid input.
|
||||||
|
|
||||||
|
|
||||||
Tests
|
Tests
|
||||||
-----
|
-----
|
||||||
|
|
|
||||||
|
|
@ -2334,6 +2334,10 @@ PyCurses_tparm(PyObject *self, PyObject *args)
|
||||||
}
|
}
|
||||||
|
|
||||||
result = tparm(fmt,i1,i2,i3,i4,i5,i6,i7,i8,i9);
|
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);
|
return PyString_FromString(result);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue