File tree Expand file tree Collapse file tree 2 files changed +3
-0
lines changed
Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -1724,6 +1724,8 @@ def load_reduce(self):
17241724 stack = self .stack
17251725 args = stack .pop ()
17261726 func = stack [- 1 ]
1727+ if not isinstance (args , tuple ):
1728+ raise TypeError ("argument list must be a tuple" )
17271729 stack [- 1 ] = func (* args )
17281730 dispatch [REDUCE [0 ]] = load_reduce
17291731
Original file line number Diff line number Diff line change @@ -1435,6 +1435,7 @@ def test_bad_reduce(self):
14351435 self .assertEqual (self .loads (b'cbuiltins\n int\n )R.' ), 0 )
14361436 self .check_unpickling_error (TypeError , b'N)R.' )
14371437 self .check_unpickling_error (TypeError , b'cbuiltins\n int\n NR.' )
1438+ self .check_unpickling_error (TypeError , b'cbuiltins\n int\n NR.' )
14381439
14391440 def test_bad_newobj (self ):
14401441 error = (pickle .UnpicklingError , TypeError )
You can’t perform that action at this time.
0 commit comments