mirror of
				https://gitlab.com/qemu-project/edk2.git
				synced 2025-10-30 07:56:39 +08:00 
			
		
		
		
	EmbeddedPkg: CodeQL Fixes.
Makes changes to comply with alerts raised by CodeQL. Most of the issues here fall into the following two categories: 1. Potential use of uninitialized pointer. 2. Inconsistent integer width in comparison. Co-authored-by: Taylor Beebe <taylor.d.beebe@gmail.com> Co-authored-by: Ken Lautner <kenlautner3@gmail.com> Co-authored-by: Bret Barkelew <bret@corthon.com> Signed-off-by: Vineel Kovvuri[MSFT] <vineelko@microsoft.com>
This commit is contained in:
		 Vineel Kovvuri[MSFT]
					Vineel Kovvuri[MSFT]
				
			
				
					committed by
					
						![mergify[bot]](/assets/img/avatar_default.png) mergify[bot]
						mergify[bot]
					
				
			
			
				
	
			
			
			![mergify[bot]](/assets/img/avatar_default.png) mergify[bot]
						mergify[bot]
					
				
			
						parent
						
							d6f828b384
						
					
				
				
					commit
					aae044a130
				
			| @ -498,6 +498,9 @@ BuildGuidDataHob ( | ||||
|   ASSERT (Data != NULL || DataLength == 0); | ||||
|  | ||||
|   HobData = BuildGuidHob (Guid, DataLength); | ||||
|   if (HobData == NULL) { | ||||
|     return NULL; | ||||
|   } | ||||
|  | ||||
|   return CopyMem (HobData, Data, DataLength); | ||||
| } | ||||
|  | ||||
| @ -283,7 +283,7 @@ FfsProcessSection ( | ||||
| { | ||||
|   EFI_STATUS                Status; | ||||
|   UINT32                    SectionLength; | ||||
|   UINT32                    ParsedLength; | ||||
|   UINTN                     ParsedLength; | ||||
|   EFI_COMPRESSION_SECTION   *CompressionSection; | ||||
|   EFI_COMPRESSION_SECTION2  *CompressionSection2; | ||||
|   UINT32                    DstBufferSize; | ||||
|  | ||||
| @ -504,6 +504,9 @@ OutputString ( | ||||
|  | ||||
|   Size         = StrLen (String) + 1; | ||||
|   OutputString = AllocatePool (Size); | ||||
|   if (OutputString == NULL) { | ||||
|     return EFI_OUT_OF_RESOURCES; | ||||
|   } | ||||
|  | ||||
|   // If there is any non-ascii characters in String buffer then replace it with '?' | ||||
|   // Eventually, UnicodeStrToAsciiStr API should be fixed. | ||||
|  | ||||
		Reference in New Issue
	
	Block a user