mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	Closes release blocker #3627.
Merged revisions 65335 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk TESTED=./python -E -tt ./Lib/test/regrtest.py -uall (both debug and opt) ........ r65335 | neal.norwitz | 2008-07-31 10:17:14 -0700 (Thu, 31 Jul 2008) | 1 line Security patches from Apple: prevent int overflow when allocating memory ........
This commit is contained in:
		
							parent
							
								
									06db799a53
								
							
						
					
					
						commit
						3ce5d9207e
					
				
					 11 changed files with 201 additions and 26 deletions
				
			
		|  | @ -304,11 +304,13 @@ def test_repeat(self): | |||
|             self.assertEqual(id(s), id(s*1)) | ||||
| 
 | ||||
|     def test_bigrepeat(self): | ||||
|         x = self.type2test([0]) | ||||
|         x *= 2**16 | ||||
|         self.assertRaises(MemoryError, x.__mul__, 2**16) | ||||
|         if hasattr(x, '__imul__'): | ||||
|             self.assertRaises(MemoryError, x.__imul__, 2**16) | ||||
|         import sys | ||||
|         if sys.maxsize <= 2147483647: | ||||
|             x = self.type2test([0]) | ||||
|             x *= 2**16 | ||||
|             self.assertRaises(MemoryError, x.__mul__, 2**16) | ||||
|             if hasattr(x, '__imul__'): | ||||
|                 self.assertRaises(MemoryError, x.__imul__, 2**16) | ||||
| 
 | ||||
|     def test_subscript(self): | ||||
|         a = self.type2test([10, 11]) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Neal Norwitz
						Neal Norwitz