mirror of https://github.com/acidanthera/audk.git
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:
parent
95083f7db5
commit
8391ffdc15
|
@ -508,7 +508,7 @@ Returns:
|
|||
//
|
||||
// Check input parameter
|
||||
//
|
||||
if (AsciiString == NULL || ReturnValue == NULL) {
|
||||
if (AsciiString == NULL || ReturnValue == NULL || strlen(AsciiString) > 0xFF) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
while (AsciiString[Index] == ' ') {
|
||||
|
|
Loading…
Reference in New Issue