mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-11-01 00:17:27 +03:00 
			
		
		
		
	Check all reserved bytes in FLI header (#9183)
This commit is contained in:
		
						commit
						a2e2939240
					
				
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							|  | @ -49,7 +49,12 @@ class FliImageFile(ImageFile.ImageFile): | |||
|     def _open(self) -> None: | ||||
|         # HEAD | ||||
|         s = self.fp.read(128) | ||||
|         if not (_accept(s) and s[20:22] == b"\x00\x00"): | ||||
|         if not ( | ||||
|             _accept(s) | ||||
|             and s[20:22] == b"\x00" * 2 | ||||
|             and s[42:80] == b"\x00" * 38 | ||||
|             and s[88:] == b"\x00" * 40 | ||||
|         ): | ||||
|             msg = "not an FLI/FLC file" | ||||
|             raise SyntaxError(msg) | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user