mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-11-04 09:57:43 +03:00 
			
		
		
		
	FLI tests for Oss-fuzz crash.
* Note, valgrind doesn't pick this up, it's only the oss-fuzz reproducer that catches it OMM.
This commit is contained in:
		
							parent
							
								
									94a0cf1b14
								
							
						
					
					
						commit
						bd5cf7db87
					
				
							
								
								
									
										
											BIN
										
									
								
								Tests/images/crash-5762152299364352.fli
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Tests/images/crash-5762152299364352.fli
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
						 | 
				
			
			@ -138,3 +138,16 @@ def test_timeouts(test_file):
 | 
			
		|||
        with Image.open(f) as im:
 | 
			
		||||
            with pytest.raises(OSError):
 | 
			
		||||
                im.load()
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@pytest.mark.parametrize(
 | 
			
		||||
    "test_file",
 | 
			
		||||
    [
 | 
			
		||||
        "Tests/images/crash-5762152299364352.fli",
 | 
			
		||||
    ],
 | 
			
		||||
)
 | 
			
		||||
def test_crash(test_file):
 | 
			
		||||
    with open(test_file, "rb") as f:
 | 
			
		||||
        with Image.open(f) as im:
 | 
			
		||||
            with pytest.raises(OSError):
 | 
			
		||||
                im.load()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user