mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
bpo-27666: Fixed stack corruption in curses.box() and curses.ungetmouse(). (#4220)
This commit is contained in:
parent
7e68790f3d
commit
4f469c0966
3 changed files with 37 additions and 13 deletions
|
|
@ -92,7 +92,7 @@ class TestCurses(unittest.TestCase):
|
|||
with self.subTest(meth=meth.__qualname__, args=args):
|
||||
meth(*args)
|
||||
|
||||
for meth in [stdscr.box, stdscr.clear, stdscr.clrtobot,
|
||||
for meth in [stdscr.clear, stdscr.clrtobot,
|
||||
stdscr.clrtoeol, stdscr.cursyncup, stdscr.delch,
|
||||
stdscr.deleteln, stdscr.erase, stdscr.getbegyx,
|
||||
stdscr.getbkgd, stdscr.getkey, stdscr.getmaxyx,
|
||||
|
|
@ -126,6 +126,13 @@ class TestCurses(unittest.TestCase):
|
|||
win.border(65, 66, 67, 68,
|
||||
69, [], 71, 72)
|
||||
|
||||
win.box(65, 67)
|
||||
win.box('!', '_')
|
||||
win.box(b':', b'~')
|
||||
self.assertRaises(TypeError, win.box, 65, 66, 67)
|
||||
self.assertRaises(TypeError, win.box, 65)
|
||||
win.box()
|
||||
|
||||
stdscr.clearok(1)
|
||||
|
||||
win4 = stdscr.derwin(2,2)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue