diff --git a/common/ffsparser.cpp b/common/ffsparser.cpp index 39093d7..e631b1c 100644 --- a/common/ffsparser.cpp +++ b/common/ffsparser.cpp @@ -2319,12 +2319,12 @@ STATUS FfsParser::parseGuidedSectionBody(const QModelIndex & index) // Check if section requires processing QByteArray processed = model->body(index); + QByteArray efiDecompressed; QString info; bool parseCurrentSection = true; UINT8 algorithm = COMPRESSION_ALGORITHM_NONE; // Tiano compressed section if (QByteArray((const char*)&guid, sizeof(EFI_GUID)) == EFI_GUIDED_SECTION_TIANO) { - QByteArray efiDecompressed; algorithm = EFI_STANDARD_COMPRESSION; STATUS result = decompress(model->body(index), algorithm, processed, efiDecompressed); if (result) { @@ -2355,7 +2355,7 @@ STATUS FfsParser::parseGuidedSectionBody(const QModelIndex & index) // LZMA compressed section else if (QByteArray((const char*)&guid, sizeof(EFI_GUID)) == EFI_GUIDED_SECTION_LZMA) { algorithm = EFI_CUSTOMIZED_COMPRESSION; - STATUS result = decompress(model->body(index), algorithm, processed); + STATUS result = decompress(model->body(index), algorithm, processed, efiDecompressed); if (result) { parseCurrentSection = false; msg(tr("parseGuidedSectionBody: decompression failed with error \"%1\"").arg(errorCodeToQString(result)), index); diff --git a/common/utility.h b/common/utility.h index ca9582c..fc572f4 100644 --- a/common/utility.h +++ b/common/utility.h @@ -29,7 +29,7 @@ QByteArray parsingDataToQByteArray(const PARSING_DATA & pdata); extern QString errorCodeToQString(UINT8 errorCode); // Decompression routine -extern STATUS decompress(const QByteArray & compressed, UINT8 & algorithm, QByteArray & decompressed, QByteArray & efiDecompressed = QByteArray()); +extern STATUS decompress(const QByteArray & compressed, UINT8 & algorithm, QByteArray & decompressed, QByteArray & efiDecompressed); // Compression routine //STATUS compress(const QByteArray & decompressed, QByteArray & compressed, const UINT8 & algorithm); @@ -43,4 +43,4 @@ extern UINT8 calculateChecksum8(const UINT8* buffer, UINT32 bufferSize); // 16bit checksum calculation routine extern UINT16 calculateChecksum16(const UINT16* buffer, UINT32 bufferSize); -#endif \ No newline at end of file +#endif