Throw a JpegError when a JPEG image has no frame data (issue 17302)
				
					
				
			Given that there's nothing to parse in this case, since we're dealing with an invalid JPEG image, throwing an *explicit* Error makes sense here.
This commit is contained in:
		
							parent
							
								
									d8424a43ba
								
							
						
					
					
						commit
						a6f0609a6e
					
				| @ -1073,6 +1073,9 @@ class JpegImage { | ||||
|       offset += 2; | ||||
|     } | ||||
| 
 | ||||
|     if (!frame) { | ||||
|       throw new JpegError("JpegImage.parse - no frame data found."); | ||||
|     } | ||||
|     this.width = frame.samplesPerLine; | ||||
|     this.height = frame.scanLines; | ||||
|     this.jfif = jfif; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user