mirror of
				https://github.com/acidanthera/audk.git
				synced 2025-10-31 11:13:53 +01:00 
			
		
		
		
	Add return EFI_INVALID_PARAMETER if pointer type parameter for UEFI and Tiano Decompress protocol function is NULL. The check is necessary. The protocols is built based on library instance of the Decompress Library. The Library class in MDE library spec 0.60e only define to do ASSERT for NULL pointer input.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2501 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
		
							parent
							
								
									c91c4f470e
								
							
						
					
					
						commit
						e2180ee88c
					
				| @ -848,6 +848,11 @@ DxeMainUefiDecompressGetInfo ( | ||||
|   OUT  UINT32                           *ScratchSize | ||||
|   ) | ||||
| { | ||||
|   if (Source == NULL  | ||||
|         || DestinationSize == NULL  | ||||
|         || ScratchSize == NULL) { | ||||
|     return EFI_INVALID_PARAMETER; | ||||
|   } | ||||
|   return UefiDecompressGetInfo (Source, SourceSize, DestinationSize, ScratchSize); | ||||
| } | ||||
| 
 | ||||
| @ -866,7 +871,13 @@ DxeMainUefiDecompress ( | ||||
|   EFI_STATUS  Status; | ||||
|   UINT32      TestDestinationSize; | ||||
|   UINT32      TestScratchSize; | ||||
| 
 | ||||
|    | ||||
|   if (Source == NULL  | ||||
|         || Destination== NULL  | ||||
|         || Scratch == NULL) { | ||||
|     return EFI_INVALID_PARAMETER; | ||||
|   } | ||||
|    | ||||
|   Status = UefiDecompressGetInfo (Source, SourceSize, &TestDestinationSize, &TestScratchSize); | ||||
|   if (EFI_ERROR (Status)) { | ||||
|     return Status; | ||||
| @ -888,6 +899,12 @@ DxeMainTianoDecompressGetInfo ( | ||||
|   OUT  UINT32                           *ScratchSize | ||||
|   ) | ||||
| { | ||||
|   if (Source == NULL  | ||||
|         || DestinationSize == NULL  | ||||
|         || ScratchSize == NULL) { | ||||
|     return EFI_INVALID_PARAMETER; | ||||
|   } | ||||
| 
 | ||||
|   return TianoDecompressGetInfo (Source, SourceSize, DestinationSize, ScratchSize); | ||||
| } | ||||
| 
 | ||||
| @ -906,7 +923,13 @@ DxeMainTianoDecompress ( | ||||
|   EFI_STATUS  Status; | ||||
|   UINT32      TestDestinationSize; | ||||
|   UINT32      TestScratchSize; | ||||
| 
 | ||||
|    | ||||
|   if (Source == NULL  | ||||
|         || Destination== NULL  | ||||
|         || Scratch == NULL) { | ||||
|     return EFI_INVALID_PARAMETER; | ||||
|   } | ||||
|    | ||||
|   Status = TianoDecompressGetInfo (Source, SourceSize, &TestDestinationSize, &TestScratchSize); | ||||
|   if (EFI_ERROR (Status)) { | ||||
|     return Status; | ||||
| @ -928,6 +951,12 @@ DxeMainCustomDecompressGetInfo ( | ||||
|   OUT  UINT32                            *ScratchSize | ||||
|   ) | ||||
| { | ||||
|   if (Source == NULL  | ||||
|         || DestinationSize == NULL  | ||||
|         || ScratchSize == NULL) { | ||||
|     return EFI_INVALID_PARAMETER; | ||||
|   } | ||||
|    | ||||
|   return CustomDecompressGetInfo (Source, SourceSize, DestinationSize, ScratchSize); | ||||
| } | ||||
| 
 | ||||
| @ -947,6 +976,12 @@ DxeMainCustomDecompress ( | ||||
|   UINT32      TestDestinationSize; | ||||
|   UINT32      TestScratchSize; | ||||
| 
 | ||||
|   if (Source == NULL  | ||||
|         || Destination== NULL  | ||||
|         || Scratch == NULL) { | ||||
|     return EFI_INVALID_PARAMETER; | ||||
|   } | ||||
| 
 | ||||
|   Status = CustomDecompressGetInfo (Source, SourceSize, &TestDestinationSize, &TestScratchSize); | ||||
|   if (EFI_ERROR (Status)) { | ||||
|     return Status; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user