diff options
Diffstat (limited to 'MdeModulePkg/Library/UefiIfrSupportLib')
-rw-r--r-- | MdeModulePkg/Library/UefiIfrSupportLib/UefiIfrForm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/MdeModulePkg/Library/UefiIfrSupportLib/UefiIfrForm.c b/MdeModulePkg/Library/UefiIfrSupportLib/UefiIfrForm.c index 3feaf92958..9e6d3382f7 100644 --- a/MdeModulePkg/Library/UefiIfrSupportLib/UefiIfrForm.c +++ b/MdeModulePkg/Library/UefiIfrSupportLib/UefiIfrForm.c @@ -1009,7 +1009,7 @@ ConstructConfigHdr ( // | 5 | 32 | 6 | NameStrLen*4 | 6 | DevicePathStrLen | 1 |
//
BufferSize = (5 + 32 + 6 + NameStrLen * 4 + 6 + DevicePathSize * 2 + 1) * sizeof (CHAR16);
- if (*StrBufferLen < BufferSize) {
+ if ((*StrBufferLen == 0) || *StrBufferLen < BufferSize) {
*StrBufferLen = BufferSize;
return EFI_BUFFER_TOO_SMALL;
}
|