forked from mirrors/gecko-dev
		
	Bug 1890090. Check return value of WebPInitDecBuffer in webp decoder. r=gfx-reviewers,lsalzman
libwebp 1.4.0 makes this function no discard so we'll have to check it. Differential Revision: https://phabricator.services.mozilla.com/D206837
This commit is contained in:
		
							parent
							
								
									a39aed6c20
								
							
						
					
					
						commit
						862f126871
					
				
					 1 changed files with 7 additions and 1 deletions
				
			
		|  | @ -219,7 +219,13 @@ nsresult nsWebPDecoder::CreateFrame(const OrientedIntRect& aFrameRect) { | ||||||
|     PostHasTransparency(); |     PostHasTransparency(); | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   WebPInitDecBuffer(&mBuffer); |   if (!WebPInitDecBuffer(&mBuffer)) { | ||||||
|  |     MOZ_LOG( | ||||||
|  |         sWebPLog, LogLevel::Error, | ||||||
|  |         ("[this=%p] nsWebPDecoder::CreateFrame -- WebPInitDecBuffer failed\n", | ||||||
|  |          this)); | ||||||
|  |     return NS_ERROR_FAILURE; | ||||||
|  |   } | ||||||
| 
 | 
 | ||||||
|   switch (SurfaceFormat::OS_RGBA) { |   switch (SurfaceFormat::OS_RGBA) { | ||||||
|     case SurfaceFormat::B8G8R8A8: |     case SurfaceFormat::B8G8R8A8: | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue
	
	 Timothy Nikkel
						Timothy Nikkel