mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-11-04 01:47:47 +03:00 
			
		
		
		
	EPS parser: don't index blank lines
This commit is contained in:
		
							parent
							
								
									883858151d
								
							
						
					
					
						commit
						b885c04388
					
				| 
						 | 
					@ -275,13 +275,13 @@ class EpsImageFile(ImageFile.ImageFile):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            s = fp.readline().strip('\r\n')
 | 
					            s = fp.readline().strip('\r\n')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            if s[0] != "%":
 | 
					            if s[:1] != "%":
 | 
				
			||||||
                break
 | 
					                break
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        #
 | 
					        #
 | 
				
			||||||
        # Scan for an "ImageData" descriptor
 | 
					        # Scan for an "ImageData" descriptor
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        while s[0] == "%":
 | 
					        while s[:1] == "%":
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            if len(s) > 255:
 | 
					            if len(s) > 255:
 | 
				
			||||||
                raise SyntaxError("not an EPS file")
 | 
					                raise SyntaxError("not an EPS file")
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user