BaseTools: Add parameter check for the AsciiStringToUint64
If the input parameter AsciiString length is greater than 255, the GenFv will hang. This patch is to fix this issue. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
@ -508,7 +508,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Check input parameter
|
// Check input parameter
|
||||||
//
|
//
|
||||||
if (AsciiString == NULL || ReturnValue == NULL) {
|
if (AsciiString == NULL || ReturnValue == NULL || strlen(AsciiString) > 0xFF) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
while (AsciiString[Index] == ' ') {
|
while (AsciiString[Index] == ' ') {
|
||||||
|
Reference in New Issue
Block a user