diff --git a/common/LZMA/LzmaCompress.c b/common/LZMA/LzmaCompress.c index c4411f3..2bde912 100644 --- a/common/LZMA/LzmaCompress.c +++ b/common/LZMA/LzmaCompress.c @@ -74,7 +74,7 @@ LzmaCompress( if (*DestinationSize < destLen) { - *DestinationSize = destLen; + *DestinationSize = (UINTN)destLen; return EFI_BUFFER_TOO_SMALL; } diff --git a/common/nvramparser.cpp b/common/nvramparser.cpp index aafd160..80a28c8 100644 --- a/common/nvramparser.cpp +++ b/common/nvramparser.cpp @@ -1401,7 +1401,7 @@ USTATUS NvramParser::parseVssStoreBody(const UModelIndex & index, UINT8 alignmen UINT8 subtype = 0; UString name; UString text; - EFI_GUID* variableGuid; + EFI_GUID* variableGuid = NULL; CHAR16* variableName = (CHAR16*)L""; UByteArray header; UByteArray body; @@ -1527,7 +1527,7 @@ USTATUS NvramParser::parseVssStoreBody(const UModelIndex & index, UINT8 alignmen UString info; // Rename invalid variables - if (isInvalid) { + if (isInvalid || !variableGuid) { name = UString("Invalid"); } else { // Add GUID and text for valid variables